Skip to content

Commit e19f35b

Browse files
committed
TEST: Expect new exception type from Matplotlib 3.6+
1 parent 4b432da commit e19f35b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

nibabel/tests/test_viewers.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,12 @@ def test_viewer():
5555
v.clim = (0, 3)
5656
with pytest.raises(ValueError):
5757
OrthoSlicer3D.clim.fset(v, (0.,)) # bad limits
58-
with pytest.raises(ValueError):
58+
with pytest.raises(
59+
(
60+
ValueError, # MPL3.5 and lower
61+
KeyError, # MPL3.6 and higher
62+
)
63+
):
5964
OrthoSlicer3D.cmap.fset(v, 'foo') # wrong cmap
6065

6166
# decrement/increment volume numbers via keypress

0 commit comments

Comments
 (0)