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 38
38
from nose .tools import (assert_true , assert_false , assert_equal ,
39
39
assert_raises )
40
40
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
+ )
42
47
43
48
from . import test_analyze as tana
44
49
from . import test_spm99analyze as tspm
@@ -563,7 +568,9 @@ def test_slice_times(self):
563
568
hdr2 .set_dim_info (slice = 2 )
564
569
hdr2 .set_slice_duration (0.1 )
565
570
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
567
574
# but always must be choosing sequential one first
568
575
assert_equal (hdr2 .get_value_label ('slice_code' ), 'sequential decreasing' )
569
576
# and the other direction
You can’t perform that action at this time.
0 commit comments