Skip to content

Commit 6240dfc

Browse files
Only test h5py if installed
1 parent 5393653 commit 6240dfc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

hendrics/tests/test_parallel.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@
1010
from hendrics.parallel import main as main_parallel
1111

1212
HAS_MPI = importlib.util.find_spec("mpi4py") is not None
13+
HAS_HDF5 = importlib.util.find_spec("h5py") is not None
1314

1415
test_cases = ["none", "multiprocessing"]
1516
if HAS_MPI:
1617
test_cases.append("mpi")
1718

1819

20+
@pytest.mark.skipif(not HAS_HDF5, reason="h5py is required for this test")
1921
class TestParallel:
2022
def setup_class(cls):
2123
cls.tempfile = tempfile.NamedTemporaryFile(suffix=".fits", delete=False)

0 commit comments

Comments
 (0)