Skip to content

Commit 70bdc3c

Browse files
committed
updates after code review
1 parent 663a68d commit 70bdc3c

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎paths_cli/tests/wizard/conftest.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import openpathsampling as paths
44
import mdtraj as md
55

6+
# should be able to remove this try block when we drop OpenMM < 7.6
67
try:
78
import openmm as mm
89
from openmm import unit as u
@@ -22,8 +23,9 @@ def ad_openmm(tmpdir):
2223
"""
2324
Provide directory with files to start alanine depeptide sim in OpenMM
2425
"""
26+
# switch back to importorskip when we drop OpenMM < 7.6
2527
if not HAS_OPENMM:
26-
pytest.skip()
28+
pytest.skip("could not import openmm")
2729
# mm = pytest.importorskip('simtk.openmm')
2830
# u = pytest.importorskip('simtk.unit')
2931
openmmtools = pytest.importorskip('openmmtools')

‎paths_cli/tests/wizard/test_openmm.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
_load_openmm_xml, _load_topology, openmm, OPENMM_SERIALIZATION_URL
99
)
1010

11+
# should be able to remove this try block when we drop OpenMM < 7.6
1112
try:
1213
import openmm as mm
1314
except ImportError:
@@ -25,8 +26,9 @@ def test_helper_url():
2526

2627
@pytest.mark.parametrize('obj_type', ['system', 'integrator', 'foo'])
2728
def test_load_openmm_xml(ad_openmm, obj_type):
29+
# switch back to importorskip when we drop OpenMM < 7.6
2830
if not HAS_OPENMM:
29-
pytest.skip()
31+
pytest.skip("could not import openmm")
3032
# mm = pytest.importorskip("simtk.openmm")
3133
filename = f"{obj_type}.xml"
3234
inputs = [filename]

‎paths_cli/wizard/openmm.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from paths_cli.wizard.errors import FILE_LOADING_ERROR_MSG, not_installed
22
from paths_cli.wizard.core import get_object
3+
4+
# should be able to simplify this try block when we drop OpenMM < 7.6
35
try:
46
import openmm as mm
57
except ImportError:

0 commit comments

Comments
 (0)