##// END OF EJS Templates
Pass along namespaces, so that we can find objects when calling in ipdb.
Pass along namespaces, so that we can find objects when calling in ipdb.

File last commit:

r7875:2549896b
r7905:47675392
Show More
test_debugger.py
35 lines | 1.3 KiB | text/x-python | PythonLexer
Fernando Perez
Add simple test for modified repr as per review.
r7087 """Tests for debugging machinery.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2012, The IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
# third-party
import nose.tools as nt
# Our own
from IPython.core import debugger
#-----------------------------------------------------------------------------
# Tests
#-----------------------------------------------------------------------------
def test_longer_repr():
from repr import repr as trepr
a = '1234567890'* 7
ar = "'1234567890123456789012345678901234567890123456789012345678901234567890'"
a_trunc = "'123456789012...8901234567890'"
Bradley M. Froehle
s/nt.assert_equals/nt.assert_equal/
r7875 nt.assert_equal(trepr(a), a_trunc)
Fernando Perez
Add simple test for modified repr as per review.
r7087 # The creation of our tracer modifies the repr module's repr function
# in-place, since that global is used directly by the stdlib's pdb module.
t = debugger.Tracer()
Bradley M. Froehle
s/nt.assert_equals/nt.assert_equal/
r7875 nt.assert_equal(trepr(a), ar)