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 @@ -83,6 +83,18 @@ class TestNifti1PairHeader(tana.TestAnalyzeHeader, tspm.HeaderScalingMixin):
83
83
np .longcomplex ))
84
84
tana .add_intp (supported_np_types )
85
85
86
+ def setUp (self ):
87
+ # Add warning filters for duration of test case
88
+ self ._wctx = warnings .catch_warnings ()
89
+ self ._wctx .__enter__ ()
90
+ warnings .filterwarnings ('ignore' , 'get_zooms' , FutureWarning )
91
+ warnings .filterwarnings ('ignore' , 'Unknown (spatial|time) units' ,
92
+ UserWarning )
93
+
94
+ def tearDown (self ):
95
+ # Restore warning filters
96
+ self ._wctx .__exit__ ()
97
+
86
98
def test_empty (self ):
87
99
tana .TestAnalyzeHeader .test_empty (self )
88
100
hdr = self .header_class ()
@@ -765,6 +777,18 @@ class TestNifti1Pair(tana.TestAnalyzeImage, tspm.ImageScalingMixin):
765
777
image_class = Nifti1Pair
766
778
supported_np_types = TestNifti1PairHeader .supported_np_types
767
779
780
+ def setUp (self ):
781
+ # Add warning filters for duration of test case
782
+ self ._wctx = warnings .catch_warnings ()
783
+ self ._wctx .__enter__ ()
784
+ warnings .filterwarnings ('ignore' , 'get_zooms' , FutureWarning )
785
+ warnings .filterwarnings ('ignore' , 'Unknown (spatial|time) units' ,
786
+ UserWarning )
787
+
788
+ def tearDown (self ):
789
+ # Restore warning filters
790
+ self ._wctx .__exit__ ()
791
+
768
792
def test_int64_warning (self ):
769
793
# Verify that initializing with (u)int64 data and no
770
794
# header/dtype info produces a warning
You can’t perform that action at this time.
0 commit comments