Using '%matplotlib inline' twice should not reset formatters
(shell_pylab_fixture)
| 246 | |
| 247 | |
| 248 | def test_inline_twice(shell_pylab_fixture): |
| 249 | "Using '%matplotlib inline' twice should not reset formatters" |
| 250 | |
| 251 | ip = shell_pylab_fixture |
| 252 | gui, backend = ip.enable_matplotlib("inline") |
| 253 | assert gui is None |
| 254 | |
| 255 | fmts = {"png"} |
| 256 | active_mimes = {_fmt_mime_map[fmt] for fmt in fmts} |
| 257 | pt.select_figure_formats(ip, fmts) |
| 258 | |
| 259 | gui, backend = ip.enable_matplotlib("inline") |
| 260 | assert gui is None |
| 261 | |
| 262 | for mime, f in ip.display_formatter.formatters.items(): |
| 263 | if mime in active_mimes: |
| 264 | assert Figure in f |
| 265 | else: |
| 266 | assert Figure not in f |
| 267 | |
| 268 | |
| 269 | def test_qt_gtk(shell_pylab_fixture): |
nothing calls this directly
no test coverage detected
searching dependent graphs…