Skip to content

Commit

Permalink
Don't skip all tests if numpy is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Feb 1, 2024
1 parent 1329151 commit 1891469
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/test_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ def test_get_global_coordinates_particle_no_coords(self):
expected_coord = numpy.array([[1., 2., 3.]])
self.assertLess(numpy.linalg.norm(coord - expected_coord), 1e-4)

@unittest.skipIf(RMF.RMF_HAS_NUMPY, "We have numpy")
def test_numpy_is_missing(self):
"""Check that the numpy library is missing"""
# This test is a noop; it is here simply so that not all tests are
# skipped when numpy is missing (Python 3.12 flags all tests being
# skipped as an error)
pass


if __name__ == '__main__':
unittest.main()

0 comments on commit 1891469

Please sign in to comment.