Skip to content

Commit a411f33

Browse files
committed
TEST: Use skipif mark instead of TestMinc2API.__init__
1 parent fb2a828 commit a411f33

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

nibabel/tests/test_image_api.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -712,12 +712,8 @@ class TestMinc1API(ImageHeaderAPI):
712712
example_images = MINC1_EXAMPLE_IMAGES
713713

714714

715+
@pytest.mark.skipif(not have_h5py, reason="Need h5py for Minc2 tests")
715716
class TestMinc2API(TestMinc1API):
716-
717-
def __init__(self):
718-
if not have_h5py:
719-
pytest.skip('Need h5py for these tests')
720-
721717
klass = image_maker = Minc2Image
722718
loader = minc2.load
723719
example_images = MINC2_EXAMPLE_IMAGES

0 commit comments

Comments
 (0)