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

Function test_pretty

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

Source from the content-addressed store, hash-verified

46 pp.text('foo')
47
48def test_pretty():
49 f = PlainTextFormatter()
50 f.for_type(A, foo_printer)
51 nt.assert_equal(f(A()), 'foo')
52 nt.assert_equal(f(B()), 'B()')
53 nt.assert_equal(f(GoodPretty()), 'foo')
54 # Just don't raise an exception for the following:
55 f(BadPretty())
56
57 f.pprint = False
58 nt.assert_equal(f(A()), 'A()')
59 nt.assert_equal(f(B()), 'B()')
60 nt.assert_equal(f(GoodPretty()), 'GoodPretty()')
61
62
63def test_deferred():

Callers

nothing calls this directly

Calls 7

PlainTextFormatterClass · 0.90
GoodPrettyClass · 0.85
BadPrettyClass · 0.85
for_typeMethod · 0.80
fFunction · 0.70
AClass · 0.70
BClass · 0.70

Tested by

no test coverage detected