@@ -69,7 +69,7 @@ def test_register_cmap():
69
69
target = "viridis2"
70
70
with pytest .warns (
71
71
PendingDeprecationWarning ,
72
- match = r"matplotlib\.colormaps\.register_cmap \(name\)"
72
+ match = r"matplotlib\.colormaps\.register \(name\)"
73
73
):
74
74
cm .register_cmap (target , new_cm )
75
75
assert mpl .colormaps [target ] == new_cm
@@ -78,13 +78,13 @@ def test_register_cmap():
78
78
match = "Arguments must include a name or a Colormap" ):
79
79
with pytest .warns (
80
80
PendingDeprecationWarning ,
81
- match = r"matplotlib\.colormaps\.register_cmap \(name\)"
81
+ match = r"matplotlib\.colormaps\.register \(name\)"
82
82
):
83
83
cm .register_cmap ()
84
84
85
85
with pytest .warns (
86
86
PendingDeprecationWarning ,
87
- match = r"matplotlib\.colormaps\.unregister_cmap \(name\)"
87
+ match = r"matplotlib\.colormaps\.unregister \(name\)"
88
88
):
89
89
cm .unregister_cmap (target )
90
90
with pytest .raises (ValueError ,
@@ -96,15 +96,15 @@ def test_register_cmap():
96
96
cm .get_cmap (target )
97
97
with pytest .warns (
98
98
PendingDeprecationWarning ,
99
- match = r"matplotlib\.colormaps\.unregister_cmap \(name\)"
99
+ match = r"matplotlib\.colormaps\.unregister \(name\)"
100
100
):
101
101
# test that second time is error free
102
102
cm .unregister_cmap (target )
103
103
104
104
with pytest .raises (TypeError , match = "'cmap' must be" ):
105
105
with pytest .warns (
106
106
PendingDeprecationWarning ,
107
- match = r"matplotlib\.colormaps\.register_cmap \(name\)"
107
+ match = r"matplotlib\.colormaps\.register \(name\)"
108
108
):
109
109
cm .register_cmap ('nome' , cmap = 'not a cmap' )
110
110
0 commit comments