File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -491,13 +491,15 @@ def test_subclass_clear_cla():
491
491
# Note, we cannot use mocking here as we want to be sure that the
492
492
# superclass fallback does not recurse.
493
493
494
- with pytest .warns (match = 'Overriding `Axes.cla`' ):
494
+ with pytest .warns (PendingDeprecationWarning ,
495
+ match = 'Overriding `Axes.cla`' ):
495
496
class ClaAxes (Axes ):
496
497
def cla (self ):
497
498
nonlocal called
498
499
called = True
499
500
500
- with pytest .warns (match = 'Overriding `Axes.cla`' ):
501
+ with pytest .warns (PendingDeprecationWarning ,
502
+ match = 'Overriding `Axes.cla`' ):
501
503
class ClaSuperAxes (Axes ):
502
504
def cla (self ):
503
505
nonlocal called
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ def test_double_register_builtin_cmap():
117
117
mpl .colormaps [name ], name = name , force = True
118
118
)
119
119
with pytest .raises (ValueError , match = 'A colormap named "viridis"' ):
120
- with pytest .warns ():
120
+ with pytest .warns (PendingDeprecationWarning ):
121
121
cm .register_cmap (name , mpl .colormaps [name ])
122
122
with pytest .warns (UserWarning ):
123
123
# TODO is warning more than once!
@@ -128,7 +128,7 @@ def test_unregister_builtin_cmap():
128
128
name = "viridis"
129
129
match = f'cannot unregister { name !r} which is a builtin colormap.'
130
130
with pytest .raises (ValueError , match = match ):
131
- with pytest .warns ():
131
+ with pytest .warns (PendingDeprecationWarning ):
132
132
cm .unregister_cmap (name )
133
133
134
134
You can’t perform that action at this time.
0 commit comments