()
| 60 | #----------------------------------------------------------------------------- |
| 61 | |
| 62 | def 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 | |
| 79 | def test_ipdb_magics(): |
| 80 | '''Test calling some IPython magics from ipdb. |
nothing calls this directly
no outgoing calls
no test coverage detected