Skip to content

Commit b10f019

Browse files
fix openmm tests?
1 parent 80e5760 commit b10f019

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/openmm_md/flows/test_core.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import io
44
from pathlib import Path
55

6+
import pytest
67
from emmet.core.openmm import OpenMMInterchange, OpenMMTaskDocument
78
from jobflow import Flow
89
from MDAnalysis import Universe
@@ -11,6 +12,11 @@
1112
from atomate2.openmm.flows.core import OpenMMFlowMaker
1213
from atomate2.openmm.jobs import EnergyMinimizationMaker, NPTMaker, NVTMaker
1314

15+
try:
16+
import h5py
17+
except ImportError:
18+
h5py = None
19+
1420

1521
def test_anneal_maker(interchange, run_job):
1622
# Create an instance of AnnealMaker with custom parameters
@@ -54,6 +60,9 @@ def test_anneal_maker(interchange, run_job):
5460

5561

5662
# @pytest.mark.skip("Reporting to HDF5 is broken in MDA upstream.")
63+
@pytest.mark.skipif(
64+
condition=h5py is None, reason="h5py is required for HDF5 features."
65+
)
5766
def test_hdf5_writing(interchange, run_job):
5867
# Create an instance of AnnealMaker with custom parameters
5968
import MDAnalysis

0 commit comments

Comments
 (0)