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

Function test_longer_repr

IPython/core/tests/test_debugger.py:62–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60#-----------------------------------------------------------------------------
61
62def test_longer_repr():
63 try:
64 from reprlib import repr as trepr # Py 3
65 except ImportError:
66 from repr import repr as trepr # Py 2
67
68 a = '1234567890'* 7
69 ar = "'1234567890123456789012345678901234567890123456789012345678901234567890'"
70 a_trunc = "'123456789012...8901234567890'"
71 nt.assert_equal(trepr(a), a_trunc)
72 # The creation of our tracer modifies the repr module's repr function
73 # in-place, since that global is used directly by the stdlib's pdb module.
74 with warnings.catch_warnings():
75 warnings.simplefilter('ignore', DeprecationWarning)
76 debugger.Tracer()
77 nt.assert_equal(trepr(a), ar)
78
79def test_ipdb_magics():
80 '''Test calling some IPython magics from ipdb.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected