Skip to content

Commit

Permalink
[Unittest] Skip some tests if h5py is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Aug 27, 2021
1 parent 48a77e2 commit bd9dca4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions interfaces/cython/cantera/test/test_composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def test_append_no_norm_data(self):
self.assertEqual(states[0].P, gas.P)
self.assertArrayNear(states[0].Y, gas.Y)

@utilities.unittest.skipIf(isinstance(_h5py, ImportError), "h5py is not installed")
def test_import_no_norm_data(self):
outfile = self.test_work_path / "solutionarray.h5"
# In Python >= 3.8, this can be replaced by the missing_ok argument
Expand Down Expand Up @@ -469,6 +470,7 @@ def check(a, b):
b.restore_data(data)
check(a, b)

@utilities.unittest.skipIf(isinstance(_h5py, ImportError), "h5py is not installed")
def test_import_no_norm_water(self):
outfile = self.test_work_path / "solutionarray.h5"
# In Python >= 3.8, this can be replaced by the missing_ok argument
Expand Down

0 comments on commit bd9dca4

Please sign in to comment.