Thanks to visit codestin.com Credit goes to github.com
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 d62cd55 commit d3ca7e2Copy full SHA for d3ca7e2
lib/matplotlib/tests/test_colors.py
@@ -1135,3 +1135,16 @@ def test_hex_shorthand_notation():
1135
def test_DivergingNorm_deprecated():
1136
with pytest.warns(cbook.MatplotlibDeprecationWarning):
1137
norm = mcolors.DivergingNorm(vcenter=0)
1138
+
1139
1140
+def test_repr_png():
1141
+ cmap = plt.get_cmap('viridis')
1142
+ png = cmap._repr_png_()
1143
+ assert len(png) > 0
1144
1145
1146
+def test_repr_html():
1147
1148
+ html = cmap._repr_html_()
1149
+ assert len(html) > 0
1150
+ assert cmap.name in html
0 commit comments