MCPcopy Create free account
hub / github.com/ipython/ipython / test_select_figure_formats_set

Function test_select_figure_formats_set

IPython/core/tests/test_pylabtools.py:118–132  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

116 assert png.startswith(_PNG)
117
118def 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
134def test_select_figure_formats_bad():
135 ip = get_ipython()

Callers

nothing calls this directly

Calls 1

get_ipythonFunction · 0.90

Tested by

no test coverage detected