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

Function test_set_matplotlib_formats

IPython/core/tests/test_display.py:159–174  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

157
158@dec.skip_without('matplotlib')
159def test_set_matplotlib_formats():
160 from matplotlib.figure import Figure
161 formatters = get_ipython().display_formatter.formatters
162 for formats in [
163 ('png',),
164 ('pdf', 'svg'),
165 ('jpeg', 'retina', 'png'),
166 (),
167 ]:
168 active_mimes = {_fmt_mime_map[fmt] for fmt in formats}
169 display.set_matplotlib_formats(*formats)
170 for mime, f in formatters.items():
171 if mime in active_mimes:
172 nt.assert_in(Figure, f)
173 else:
174 nt.assert_not_in(Figure, f)
175
176@dec.skip_without('matplotlib')
177def test_set_matplotlib_formats_kwargs():

Callers

nothing calls this directly

Calls 1

get_ipythonFunction · 0.90

Tested by

no test coverage detected