MCPcopy Index your code
hub / github.com/ipython/ipython / test_pretty

Function test_pretty

tests/test_formatters.py:89–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87
88
89def test_pretty():
90 f = PlainTextFormatter()
91 f.for_type(A, foo_printer)
92 assert f(A()) == "foo"
93 assert f(B()) == "B()"
94 assert f(GoodPretty()) == "foo"
95 # Just don't raise an exception for the following:
96 f(BadPretty())
97
98 f.pprint = False
99 assert f(A()) == "A()"
100 assert f(B()) == "B()"
101 assert f(GoodPretty()) == "GoodPretty()"
102
103
104def 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…