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

Function test_json_as_string_deprecated

IPython/core/tests/test_formatters.py:426–435  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

424
425
426def test_json_as_string_deprecated():
427 class JSONString(object):
428 def _repr_json_(self):
429 return '{}'
430
431 f = JSONFormatter()
432 with warnings.catch_warnings(record=True) as w:
433 d = f(JSONString())
434 nt.assert_equal(d, {})
435 nt.assert_equal(len(w), 1)
436
437
438def test_repr_mime():

Callers

nothing calls this directly

Calls 3

JSONFormatterClass · 0.90
JSONStringClass · 0.85
fFunction · 0.70

Tested by

no test coverage detected