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

Function test_pprint_break_repr

IPython/lib/tests/test_pretty.py:145–155  ·  view source on GitHub ↗

Test that p.break_ is used in repr

()

Source from the content-addressed store, hash-verified

143 nt.assert_equal(output, expected)
144
145def test_pprint_break_repr():
146 """
147 Test that p.break_ is used in repr
148 """
149 output = pretty.pretty([[BreakingRepr()]])
150 expected = "[[Breaking(\n )]]"
151 nt.assert_equal(output, expected)
152
153 output = pretty.pretty([[BreakingRepr()]*2])
154 expected = "[[Breaking(\n ),\n Breaking(\n )]]"
155 nt.assert_equal(output, expected)
156
157def test_bad_repr():
158 """Don't catch bad repr errors"""

Callers

nothing calls this directly

Calls 2

BreakingReprClass · 0.85
prettyMethod · 0.80

Tested by

no test coverage detected