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

Function test_retina_figure

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

Source from the content-addressed store, hash-verified

65 assert jpeg.startswith(_JPEG)
66
67def test_retina_figure():
68 # simple empty-figure test
69 fig = plt.figure()
70 nt.assert_equal(pt.retina_figure(fig), None)
71 plt.close('all')
72
73 fig = plt.figure()
74 ax = fig.add_subplot(1,1,1)
75 ax.plot([1,2,3])
76 plt.draw()
77 png, md = pt.retina_figure(fig)
78 assert png.startswith(_PNG)
79 nt.assert_in('width', md)
80 nt.assert_in('height', md)
81
82_fmt_mime_map = {
83 'png': 'image/png',

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected