()
| 193 | |
| 194 | @dec.skip_without("matplotlib") |
| 195 | def test_set_matplotlib_formats_kwargs(): |
| 196 | from matplotlib.figure import Figure |
| 197 | from matplotlib_inline.backend_inline import set_matplotlib_formats |
| 198 | |
| 199 | ip = get_ipython() |
| 200 | cfg = _get_inline_config() |
| 201 | cfg.print_figure_kwargs.update(dict(foo="bar")) |
| 202 | kwargs = dict(dpi=150) |
| 203 | try: |
| 204 | set_matplotlib_formats("png", **kwargs) |
| 205 | formatter = ip.display_formatter.formatters["image/png"] |
| 206 | f = formatter.lookup_by_type(Figure) |
| 207 | formatter_kwargs = f.keywords |
| 208 | expected = kwargs |
| 209 | expected["base64"] = True |
| 210 | expected["fmt"] = "png" |
| 211 | expected.update(cfg.print_figure_kwargs) |
| 212 | assert formatter_kwargs == expected |
| 213 | finally: |
| 214 | cfg.print_figure_kwargs.clear() |
| 215 | |
| 216 | |
| 217 | @dec.skip_without("matplotlib") |
nothing calls this directly
no test coverage detected
searching dependent graphs…