pyodide/test/test_matplotlib.py

10 lines
296 B
Python
Raw Normal View History

2018-05-17 15:57:39 +00:00
def test_matplotlib(selenium):
selenium.load_package("matplotlib")
img = selenium.run(
"from matplotlib import pyplot as plt\n"
"plt.plot([1,2,3])\n"
"plt.gcf()._repr_html_().src"
)
assert img.startswith('data:image/png;base64,')
assert len(img) == 42