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

Function test_set_matplotlib_formats_kwargs

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

Source from the content-addressed store, hash-verified

175
176@dec.skip_without('matplotlib')
177def test_set_matplotlib_formats_kwargs():
178 from matplotlib.figure import Figure
179 ip = get_ipython()
180 cfg = _get_inline_config()
181 cfg.print_figure_kwargs.update(dict(foo='bar'))
182 kwargs = dict(quality=10)
183 display.set_matplotlib_formats('png', **kwargs)
184 formatter = ip.display_formatter.formatters['image/png']
185 f = formatter.lookup_by_type(Figure)
186 cell = f.__closure__[0].cell_contents
187 expected = kwargs
188 expected.update(cfg.print_figure_kwargs)
189 nt.assert_equal(cell, expected)
190
191def test_display_available():
192 """

Callers

nothing calls this directly

Calls 4

get_ipythonFunction · 0.90
_get_inline_configFunction · 0.85
lookup_by_typeMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected