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 @@ -82,6 +82,18 @@ class TestNifti1PairHeader(tana.TestAnalyzeHeader, tspm.HeaderScalingMixin):
82
82
np .longcomplex ))
83
83
tana .add_intp (supported_np_types )
84
84
85
+ def setUp (self ):
86
+ # Add warning filters for duration of test case
87
+ self ._wctx = warnings .catch_warnings ()
88
+ self ._wctx .__enter__ ()
89
+ warnings .filterwarnings ('ignore' , 'get_zooms' , FutureWarning )
90
+ warnings .filterwarnings ('ignore' , 'Unknown (spatial|time) units' ,
91
+ UserWarning )
92
+
93
+ def tearDown (self ):
94
+ # Restore warning filters
95
+ self ._wctx .__exit__ ()
96
+
85
97
def test_empty (self ):
86
98
tana .TestAnalyzeHeader .test_empty (self )
87
99
hdr = self .header_class ()
@@ -753,6 +765,18 @@ class TestNifti1Pair(tana.TestAnalyzeImage, tspm.ImageScalingMixin):
753
765
image_class = Nifti1Pair
754
766
supported_np_types = TestNifti1PairHeader .supported_np_types
755
767
768
+ def setUp (self ):
769
+ # Add warning filters for duration of test case
770
+ self ._wctx = warnings .catch_warnings ()
771
+ self ._wctx .__enter__ ()
772
+ warnings .filterwarnings ('ignore' , 'get_zooms' , FutureWarning )
773
+ warnings .filterwarnings ('ignore' , 'Unknown (spatial|time) units' ,
774
+ UserWarning )
775
+
776
+ def tearDown (self ):
777
+ # Restore warning filters
778
+ self ._wctx .__exit__ ()
779
+
756
780
def test_none_qsform (self ):
757
781
# Check that affine gets set to q/sform if header is None
758
782
img_klass = self .image_class
You can’t perform that action at this time.
0 commit comments