diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml index 25fe5685d..ff6654b6f 100644 --- a/devtools/conda-envs/test_env.yaml +++ b/devtools/conda-envs/test_env.yaml @@ -30,7 +30,7 @@ dependencies: - openmmforcefields >=0.9.0 - openmmtools # may need to sort out ambermini/ambertools/parmed dependencies - openmoltools # may need to sort out ambermini/ambertools/parmed dependencies (we don't want ambertools) - - parmed # may need to sort out ambermini/ambertools/parmed dependencies + - parmed - pdbfixer - pip - progressbar2 diff --git a/perses/tests/test_examples.py b/perses/tests/test_examples.py index 95e46344a..707164a1e 100644 --- a/perses/tests/test_examples.py +++ b/perses/tests/test_examples.py @@ -12,6 +12,8 @@ # GLOBAL IMPORTS # ====================================================================== +import sys + import pathlib import pytest import subprocess @@ -25,13 +27,14 @@ def run_script_file(file_path, cmd_args=None): """Run through the shell a python script.""" with enter_temp_directory(): - cmd = ["python", file_path] + # Make sure we grab the python executable in our env + cmd = [f"{sys.executable}", file_path] print(cmd) # Extend cmd list with given cmd_args if cmd_args: cmd.extend(cmd_args) try: - subprocess.run(cmd, capture_output=True, check=True) + subprocess.run(cmd, capture_output=True, check=True, shell=True) except subprocess.CalledProcessError as error: raise Exception(f"Example {file_path} failed. STDERR: {error.stderr.decode()}")