@@ -69,7 +69,7 @@ def test_register_cmap():
6969 target = "viridis2"
7070 with pytest .warns (
7171 PendingDeprecationWarning ,
72- match = r"matplotlib\.colormaps\.register_cmap \(name\)"
72+ match = r"matplotlib\.colormaps\.register \(name\)"
7373 ):
7474 cm .register_cmap (target , new_cm )
7575 assert mpl .colormaps [target ] == new_cm
@@ -78,13 +78,13 @@ def test_register_cmap():
7878 match = "Arguments must include a name or a Colormap" ):
7979 with pytest .warns (
8080 PendingDeprecationWarning ,
81- match = r"matplotlib\.colormaps\.register_cmap \(name\)"
81+ match = r"matplotlib\.colormaps\.register \(name\)"
8282 ):
8383 cm .register_cmap ()
8484
8585 with pytest .warns (
8686 PendingDeprecationWarning ,
87- match = r"matplotlib\.colormaps\.unregister_cmap \(name\)"
87+ match = r"matplotlib\.colormaps\.unregister \(name\)"
8888 ):
8989 cm .unregister_cmap (target )
9090 with pytest .raises (ValueError ,
@@ -96,15 +96,15 @@ def test_register_cmap():
9696 cm .get_cmap (target )
9797 with pytest .warns (
9898 PendingDeprecationWarning ,
99- match = r"matplotlib\.colormaps\.unregister_cmap \(name\)"
99+ 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 (
106106 PendingDeprecationWarning ,
107- match = r"matplotlib\.colormaps\.register_cmap \(name\)"
107+ match = r"matplotlib\.colormaps\.register \(name\)"
108108 ):
109109 cm .register_cmap ('nome' , cmap = 'not a cmap' )
110110
0 commit comments