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

Function test_figure_to_svg

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

Source from the content-addressed store, hash-verified

26
27
28def test_figure_to_svg():
29 # simple empty-figure test
30 fig = plt.figure()
31 nt.assert_equal(pt.print_figure(fig, 'svg'), None)
32
33 plt.close('all')
34
35 # simple check for at least svg-looking output
36 fig = plt.figure()
37 ax = fig.add_subplot(1,1,1)
38 ax.plot([1,2,3])
39 plt.draw()
40 svg = pt.print_figure(fig, 'svg')[:100].lower()
41 nt.assert_in(u'doctype svg', svg)
42
43def _check_pil_jpeg_bytes():
44 """Skip if PIL can't write JPEGs to BytesIO objects"""

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected