File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -79,8 +79,9 @@ def test_labeltable():
79
79
assert_equal (len (img .labeltable .labels ), 2 )
80
80
81
81
# Try to set to non-table
82
- with assert_raises (ValueError ):
83
- img .labeltable = 'not-a-table'
82
+ def assign_labeltable (val ):
83
+ img .labeltable = val
84
+ assert_raises (ValueError , assign_labeltable , 'not-a-table' )
84
85
85
86
86
87
def test_metadata ():
@@ -112,10 +113,10 @@ def test_gifti_label_rgba():
112
113
assert_equal (kwargs ['blue' ], gl .rgba [2 ])
113
114
assert_equal (kwargs ['alpha' ], gl .rgba [3 ])
114
115
115
- with assert_raises ( ValueError ):
116
- gl .rgba = rgba [: 2 ]
117
- with assert_raises (ValueError ):
118
- gl . rgba = rgba .tolist () + rgba .tolist ()
116
+ def assign_rgba ( val ):
117
+ gl .rgba = val
118
+ assert_raises (ValueError , assign_rgba , rgba [: 2 ])
119
+ assert_raises ( ValueError , assign_rgba , rgba .tolist () + rgba .tolist () )
119
120
120
121
# Test deprecation
121
122
with clear_and_catch_warnings () as w :
You can’t perform that action at this time.
0 commit comments