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

Function test_custom_repr

IPython/lib/tests/test_pretty.py:467–472  ·  view source on GitHub ↗

A custom repr should override a pretty printer for a parent type

()

Source from the content-addressed store, hash-verified

465 return 'mine'
466
467def test_custom_repr():
468 """A custom repr should override a pretty printer for a parent type"""
469 oc = OrderedCounter("abracadabra")
470 nt.assert_in("OrderedCounter(OrderedDict", pretty.pretty(oc))
471
472 nt.assert_equal(pretty.pretty(MySet()), 'mine')

Callers

nothing calls this directly

Calls 3

OrderedCounterClass · 0.85
MySetClass · 0.85
prettyMethod · 0.80

Tested by

no test coverage detected