@@ -68,7 +68,7 @@ def test_register_cmap():
6868 new_cm = mpl .colormaps ["viridis" ]
6969 target = "viridis2"
7070 with pytest .warns (
71- PendingDeprecationWarning ,
71+ mpl . MatplotlibDeprecationWarning ,
7272 match = r"matplotlib\.colormaps\.register\(name\)"
7373 ):
7474 cm .register_cmap (target , new_cm )
@@ -77,33 +77,33 @@ def test_register_cmap():
7777 with pytest .raises (ValueError ,
7878 match = "Arguments must include a name or a Colormap" ):
7979 with pytest .warns (
80- PendingDeprecationWarning ,
80+ mpl . MatplotlibDeprecationWarning ,
8181 match = r"matplotlib\.colormaps\.register\(name\)"
8282 ):
8383 cm .register_cmap ()
8484
8585 with pytest .warns (
86- PendingDeprecationWarning ,
86+ mpl . MatplotlibDeprecationWarning ,
8787 match = r"matplotlib\.colormaps\.unregister\(name\)"
8888 ):
8989 cm .unregister_cmap (target )
9090 with pytest .raises (ValueError ,
9191 match = f'{ target !r} is not a valid value for name;' ):
9292 with pytest .warns (
93- PendingDeprecationWarning ,
93+ mpl . MatplotlibDeprecationWarning ,
9494 match = r"matplotlib\.colormaps\[name\]"
9595 ):
9696 cm .get_cmap (target )
9797 with pytest .warns (
98- PendingDeprecationWarning ,
98+ mpl . MatplotlibDeprecationWarning ,
9999 match = r"matplotlib\.colormaps\.unregister\(name\)"
100100 ):
101101 # test that second time is error free
102102 cm .unregister_cmap (target )
103103
104104 with pytest .raises (TypeError , match = "'cmap' must be" ):
105105 with pytest .warns (
106- PendingDeprecationWarning ,
106+ mpl . MatplotlibDeprecationWarning ,
107107 match = r"matplotlib\.colormaps\.register\(name\)"
108108 ):
109109 cm .register_cmap ('nome' , cmap = 'not a cmap' )
@@ -137,7 +137,7 @@ def test_double_register_builtin_cmap():
137137 mpl .colormaps [name ], name = name , force = True
138138 )
139139 with pytest .raises (ValueError , match = 'A colormap named "viridis"' ):
140- with pytest .warns (PendingDeprecationWarning ):
140+ with pytest .warns (mpl . MatplotlibDeprecationWarning ):
141141 cm .register_cmap (name , mpl .colormaps [name ])
142142 with pytest .warns (UserWarning ):
143143 # TODO is warning more than once!
@@ -148,7 +148,7 @@ def test_unregister_builtin_cmap():
148148 name = "viridis"
149149 match = f'cannot unregister { name !r} which is a builtin colormap.'
150150 with pytest .raises (ValueError , match = match ):
151- with pytest .warns (PendingDeprecationWarning ):
151+ with pytest .warns (mpl . MatplotlibDeprecationWarning ):
152152 cm .unregister_cmap (name )
153153
154154
0 commit comments