diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2009-06-01 21:28:37 (GMT) |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2009-06-01 21:28:37 (GMT) |
commit | 24e581f7b2dbb700705c7b11c3982167ac68d4cb (patch) | |
tree | 8cc36814d81f3ad143bac22bb311ce49434995b7 /Lib/test | |
parent | 1172999627c912b57ace149183de4a313edc74d2 (diff) | |
download | cpython-24e581f7b2dbb700705c7b11c3982167ac68d4cb.zip cpython-24e581f7b2dbb700705c7b11c3982167ac68d4cb.tar.gz cpython-24e581f7b2dbb700705c7b11c3982167ac68d4cb.tar.bz2 |
Merged revisions 73114 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r73114 | amaury.forgeotdarc | 2009-06-01 22:53:18 +0200 (lun., 01 juin 2009) | 3 lines
#4547: When debugging a very large function, it was not always
possible to update the lineno attribute of the current frame.
........
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_trace.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Lib/test/test_trace.py b/Lib/test/test_trace.py index ecb588c..43134e9 100644 --- a/Lib/test/test_trace.py +++ b/Lib/test/test_trace.py @@ -741,6 +741,23 @@ class JumpTestCase(unittest.TestCase): def test_19_no_jump_without_trace_function(self): no_jump_without_trace_function() + def test_20_large_function(self): + d = {} + exec("""def f(output): # line 0 + x = 0 # line 1 + y = 1 # line 2 + ''' # line 3 + %s # lines 4-1004 + ''' # line 1005 + x += 1 # line 1006 + output.append(x) # line 1007 + return""" % ('\n' * 1000,), d) + f = d['f'] + + f.jump = (2, 1007) + f.output = [0] + self.run_test(f) + def test_jump_to_firstlineno(self): # This tests that PDB can jump back to the first line in a # file. See issue #1689458. It can only be triggered in a |