MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_repr_png

Function test_repr_png

lib/matplotlib/tests/test_colors.py:1505–1515  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1503
1504
1505def test_repr_png():
1506 cmap = mpl.colormaps['viridis']
1507 png = cmap._repr_png_()
1508 assert len(png) > 0
1509 img = Image.open(BytesIO(png))
1510 assert img.width > 0
1511 assert img.height > 0
1512 assert 'Title' in img.text
1513 assert 'Description' in img.text
1514 assert 'Author' in img.text
1515 assert 'Software' in img.text
1516
1517
1518def test_repr_html():

Callers

nothing calls this directly

Calls 2

_repr_png_Method · 0.45
openMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…