File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 10
10
11
11
import numpy as np
12
12
13
- from numpy .testing import assert_array_equal , assert_array_almost_equal
13
+ from numpy .testing import assert_array_equal , assert_array_almost_equal , dec
14
+
15
+ # Decorator to skip tests requiring save / load if scipy not available for mat
16
+ # files
17
+ try :
18
+ import scipy
19
+ except ImportError :
20
+ have_scipy = False
21
+ else :
22
+ have_scipy = True
23
+ scipy_skip = dec .skipif (not have_scipy , 'scipy not available' )
14
24
15
25
from ..spm99analyze import Spm99AnalyzeHeader , \
16
26
Spm99AnalyzeImage , HeaderTypeError
@@ -92,6 +102,11 @@ class TestSpm99AnalyzeImage(test_analyze.TestAnalyzeImage):
92
102
# class for testing images
93
103
image_class = Spm99AnalyzeImage
94
104
105
+ # Decorating the old way, before the team invented @
106
+ test_data_hdr_cache = (scipy_skip (
107
+ test_analyze .TestAnalyzeImage .test_data_hdr_cache
108
+ ))
109
+
95
110
96
111
@parametric
97
112
def test_origin_affine ():
You can’t perform that action at this time.
0 commit comments