()
| 172 | |
| 173 | @dec.skip_without("matplotlib") |
| 174 | def test_set_matplotlib_formats(): |
| 175 | from matplotlib.figure import Figure |
| 176 | from matplotlib_inline.backend_inline import set_matplotlib_formats |
| 177 | |
| 178 | formatters = get_ipython().display_formatter.formatters |
| 179 | for formats in [ |
| 180 | ("png",), |
| 181 | ("pdf", "svg"), |
| 182 | ("jpeg", "retina", "png"), |
| 183 | (), |
| 184 | ]: |
| 185 | active_mimes = {_fmt_mime_map[fmt] for fmt in formats} |
| 186 | set_matplotlib_formats(*formats) |
| 187 | for mime, f in formatters.items(): |
| 188 | if mime in active_mimes: |
| 189 | assert Figure in f |
| 190 | else: |
| 191 | assert Figure not in f |
| 192 | |
| 193 | |
| 194 | @dec.skip_without("matplotlib") |
nothing calls this directly
no test coverage detected
searching dependent graphs…