Skip to content

Commit 7472ebf

Browse files
committed
BF: remove scipy decorator from mixin tests
I was using the decorator to say that that tests need scipy inside the scaling tests mixin, instead of in the main test function for Spm99, where this is actually true. Hence tests were being skipped for Nifti1, Nifti2 if scipy missing, when then need not be skipped.
1 parent 400e1cb commit 7472ebf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

nibabel/tests/test_spm99analyze.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,6 @@ def test_int_int_scaling(self):
319319
img_rt = bytesio_round_trip(img)
320320
assert_array_equal(img_rt.get_data(), np.clip(arr, 0, 255))
321321

322-
@scipy_skip
323322
def test_no_scaling(self):
324323
# Test writing image converting types when not calculating scaling
325324
img_class = self.image_class
@@ -368,7 +367,6 @@ def test_write_scaling(self):
368367
):
369368
self._check_write_scaling(slope, inter, e_slope, e_inter)
370369

371-
@scipy_skip
372370
def test_nan2zero_range_ok(self):
373371
# Check that a floating point image with range not including zero gets
374372
# nans scaled correctly
@@ -416,6 +414,10 @@ class TestSpm99AnalyzeImage(test_analyze.TestAnalyzeImage, ScalingMixin):
416414

417415
test_write_scaling = scipy_skip(ScalingMixin.test_write_scaling)
418416

417+
test_no_scaling = scipy_skip(ScalingMixin.test_no_scaling)
418+
419+
test_nan2zero_range_ok = scipy_skip(ScalingMixin.test_nan2zero_range_ok)
420+
419421
@scipy_skip
420422
def test_mat_read(self):
421423
# Test mat file reading and writing for the SPM analyze types

0 commit comments

Comments
 (0)