()
| 116 | assert png.startswith(_PNG) |
| 117 | |
| 118 | def test_select_figure_formats_set(): |
| 119 | ip = get_ipython() |
| 120 | for fmts in [ |
| 121 | {'png', 'svg'}, |
| 122 | ['png'], |
| 123 | ('jpeg', 'pdf', 'retina'), |
| 124 | {'svg'}, |
| 125 | ]: |
| 126 | active_mimes = {_fmt_mime_map[fmt] for fmt in fmts} |
| 127 | pt.select_figure_formats(ip, fmts) |
| 128 | for mime, f in ip.display_formatter.formatters.items(): |
| 129 | if mime in active_mimes: |
| 130 | nt.assert_in(Figure, f) |
| 131 | else: |
| 132 | nt.assert_not_in(Figure, f) |
| 133 | |
| 134 | def test_select_figure_formats_bad(): |
| 135 | ip = get_ipython() |
nothing calls this directly
no test coverage detected