()
| 65 | assert jpeg.startswith(_JPEG) |
| 66 | |
| 67 | def 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', |