File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 3838from nose .tools import (assert_true , assert_false , assert_equal ,
3939 assert_raises )
4040
41- from ..testing import data_path , suppress_warnings , runif_extra_has
41+ from ..testing import (
42+ clear_and_catch_warnings ,
43+ data_path ,
44+ runif_extra_has ,
45+ suppress_warnings ,
46+ )
4247
4348from . import test_analyze as tana
4449from . import test_spm99analyze as tspm
@@ -563,7 +568,9 @@ def test_slice_times(self):
563568 hdr2 .set_dim_info (slice = 2 )
564569 hdr2 .set_slice_duration (0.1 )
565570 hdr2 .set_data_shape ((1 , 1 , 2 ))
566- hdr2 .set_slice_times ([0.1 , 0 ]) # will generate warning that multiple match
571+ with clear_and_catch_warnings () as w :
572+ hdr2 .set_slice_times ([0.1 , 0 ])
573+ assert len (w ) == 1
567574 # but always must be choosing sequential one first
568575 assert_equal (hdr2 .get_value_label ('slice_code' ), 'sequential decreasing' )
569576 # and the other direction
You can’t perform that action at this time.
0 commit comments