File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,18 @@ class TestNifti1PairHeader(tana.TestAnalyzeHeader, tspm.HeaderScalingMixin):
80
80
np .longcomplex ))
81
81
tana .add_intp (supported_np_types )
82
82
83
+ def setUp (self ):
84
+ # Add warning filters for duration of test case
85
+ self ._wctx = warnings .catch_warnings ()
86
+ self ._wctx .__enter__ ()
87
+ warnings .filterwarnings ('ignore' , 'get_zooms' , FutureWarning )
88
+ warnings .filterwarnings ('ignore' , 'Unknown (spatial|time) units' ,
89
+ UserWarning )
90
+
91
+ def tearDown (self ):
92
+ # Restore warning filters
93
+ self ._wctx .__exit__ ()
94
+
83
95
def test_empty (self ):
84
96
tana .TestAnalyzeHeader .test_empty (self )
85
97
hdr = self .header_class ()
@@ -762,6 +774,18 @@ class TestNifti1Pair(tana.TestAnalyzeImage, tspm.ImageScalingMixin):
762
774
image_class = Nifti1Pair
763
775
supported_np_types = TestNifti1PairHeader .supported_np_types
764
776
777
+ def setUp (self ):
778
+ # Add warning filters for duration of test case
779
+ self ._wctx = warnings .catch_warnings ()
780
+ self ._wctx .__enter__ ()
781
+ warnings .filterwarnings ('ignore' , 'get_zooms' , FutureWarning )
782
+ warnings .filterwarnings ('ignore' , 'Unknown (spatial|time) units' ,
783
+ UserWarning )
784
+
785
+ def tearDown (self ):
786
+ # Restore warning filters
787
+ self ._wctx .__exit__ ()
788
+
765
789
def test_none_qsform (self ):
766
790
# Check that affine gets set to q/sform if header is None
767
791
img_klass = self .image_class
You can’t perform that action at this time.
0 commit comments