MCPcopy Create free account
hub / github.com/ipython/ipython / test_figure_to_jpeg

Function test_figure_to_jpeg

IPython/core/tests/test_pylabtools.py:57–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55
56@dec.skip_without("PIL.Image")
57def test_figure_to_jpeg():
58 _check_pil_jpeg_bytes()
59 # simple check for at least jpeg-looking output
60 fig = plt.figure()
61 ax = fig.add_subplot(1,1,1)
62 ax.plot([1,2,3])
63 plt.draw()
64 jpeg = pt.print_figure(fig, 'jpeg', pil_kwargs={'optimize': 50})[:100].lower()
65 assert jpeg.startswith(_JPEG)
66
67def test_retina_figure():
68 # simple empty-figure test

Callers

nothing calls this directly

Calls 1

_check_pil_jpeg_bytesFunction · 0.85

Tested by

no test coverage detected