Using '%matplotlib inline' twice should not reset formatters
(self)
| 215 | nt.assert_equal(s.pylab_gui_select, 'qt') |
| 216 | |
| 217 | def test_inline_twice(self): |
| 218 | "Using '%matplotlib inline' twice should not reset formatters" |
| 219 | |
| 220 | ip = self.Shell() |
| 221 | gui, backend = ip.enable_matplotlib('inline') |
| 222 | nt.assert_equal(gui, 'inline') |
| 223 | |
| 224 | fmts = {'png'} |
| 225 | active_mimes = {_fmt_mime_map[fmt] for fmt in fmts} |
| 226 | pt.select_figure_formats(ip, fmts) |
| 227 | |
| 228 | gui, backend = ip.enable_matplotlib('inline') |
| 229 | nt.assert_equal(gui, 'inline') |
| 230 | |
| 231 | for mime, f in ip.display_formatter.formatters.items(): |
| 232 | if mime in active_mimes: |
| 233 | nt.assert_in(Figure, f) |
| 234 | else: |
| 235 | nt.assert_not_in(Figure, f) |
| 236 | |
| 237 | def test_qt_gtk(self): |
| 238 | s = self.Shell() |
nothing calls this directly
no test coverage detected