MCPcopy Index your code
hub / github.com/ipython/ipython / test_set_matplotlib_formats

Function test_set_matplotlib_formats

tests/test_display_2.py:174–191  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

172
173@dec.skip_without("matplotlib")
174def 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")

Callers

nothing calls this directly

Calls 1

get_ipythonFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…