()
| 98 | nt.assert_not_in(Figure, f) |
| 99 | |
| 100 | def test_select_figure_formats_kwargs(): |
| 101 | ip = get_ipython() |
| 102 | kwargs = dict(quality=10, bbox_inches='tight') |
| 103 | pt.select_figure_formats(ip, 'png', **kwargs) |
| 104 | formatter = ip.display_formatter.formatters['image/png'] |
| 105 | f = formatter.lookup_by_type(Figure) |
| 106 | cell = f.__closure__[0].cell_contents |
| 107 | nt.assert_equal(cell, kwargs) |
| 108 | |
| 109 | # check that the formatter doesn't raise |
| 110 | fig = plt.figure() |
| 111 | ax = fig.add_subplot(1,1,1) |
| 112 | ax.plot([1,2,3]) |
| 113 | plt.draw() |
| 114 | formatter.enabled = True |
| 115 | png = formatter(fig) |
| 116 | assert png.startswith(_PNG) |
| 117 | |
| 118 | def test_select_figure_formats_set(): |
| 119 | ip = get_ipython() |
nothing calls this directly
no test coverage detected