We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b8866e commit 98117b0Copy full SHA for 98117b0
lib/matplotlib/tests/test_colors.py
@@ -86,6 +86,11 @@ def test_register_cmap():
86
87
def test_double_register_builtin_cmap():
88
name = "viridis"
89
+ match = f"Re-registering the builtin cmap {name!r}."
90
+ with pytest.raises(ValueError, match=match):
91
+ matplotlib.colormaps.register(
92
+ cm.get_cmap(name), name=name, force=True
93
+ )
94
with pytest.raises(ValueError, match='A colormap named "viridis"'):
95
cm.register_cmap(name, cm.get_cmap(name))
96
with pytest.warns(UserWarning):
0 commit comments