Skip to content

Commit 9772eef

Browse files
committed
skip tests if OpenMM/MDTraj not installed
1 parent b5cb4a4 commit 9772eef

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

paths_cli/tests/commands/test_load_trajectory.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ def run_load_trajectory(args):
2929
def test_load_trajectory_pdb(with_top, with_tag):
3030
# test that we can load a PDB file with or without topology; also tests
3131
# that the taging works correctly
32+
pytest.importorskip("openmm")
33+
pytest.importorskip("mdtraj")
3234
pdb_path = data_filename("ala_small_traj.pdb")
3335
out_file = "setup.nc"
3436
args = [
@@ -49,6 +51,8 @@ def test_load_trajectory_pdb(with_top, with_tag):
4951
assert tagged == traj
5052

5153
def test_load_trajectory_trr():
54+
pytest.importorskip("openmm")
55+
pytest.importorskip("mdtraj")
5256
trr = data_filename("gromacs_engine/project_trr/0000000.trr")
5357
gro = data_filename("gromacs_engine/conf.gro")
5458
out_file = "setup.nc"
@@ -62,6 +66,8 @@ def test_load_trajectory_trr():
6266
assert len(traj) == 4
6367

6468
def test_load_trajectory_bad_topology():
69+
pytest.importorskip("openmm")
70+
pytest.importorskip("mdtraj")
6571
trr = data_filename("gromacs_engine/project_trr/0000000.trr")
6672
pdb = data_filename("tip4p_water.pdb")
6773
out_file = "setup.nc"

0 commit comments

Comments
 (0)