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

Function test_image_mimes

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

Source from the content-addressed store, hash-verified

34
35
36def test_image_mimes():
37 fmt = get_ipython().display_formatter.format
38 for format in display.Image._ACCEPTABLE_EMBEDDINGS:
39 mime = display.Image._MIMETYPES[format]
40 img = display.Image(b'garbage', format=format)
41 data, metadata = fmt(img)
42 nt.assert_equal(sorted(data), sorted([mime, 'text/plain']))
43
44
45def test_geojson():

Callers

nothing calls this directly

Calls 1

get_ipythonFunction · 0.90

Tested by

no test coverage detected