diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-04-18 15:19:00 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-04-18 15:19:00 (GMT) |
commit | 6e3358a1d59acfd9507cd9a7b4513319b99d21ab (patch) | |
tree | ed3540fd785e50d4aba3337e3b410f00d5917194 /Lib/test | |
parent | eca851815d654c6e6ef50fe0b38b9e9c6076ceea (diff) | |
parent | e42fb307edbdc8bb98fa5d43646cbbe33f307501 (diff) | |
download | cpython-6e3358a1d59acfd9507cd9a7b4513319b99d21ab.zip cpython-6e3358a1d59acfd9507cd9a7b4513319b99d21ab.tar.gz cpython-6e3358a1d59acfd9507cd9a7b4513319b99d21ab.tar.bz2 |
merge 3.2 (#14612)
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_sys_settrace.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_sys_settrace.py b/Lib/test/test_sys_settrace.py index 578e95d..fdf958c 100644 --- a/Lib/test/test_sys_settrace.py +++ b/Lib/test/test_sys_settrace.py @@ -675,6 +675,14 @@ def no_jump_to_non_integers(output): no_jump_to_non_integers.jump = (2, "Spam") no_jump_to_non_integers.output = [True] +def jump_across_with(output): + with open(support.TESTFN, "wb") as fp: + pass + with open(support.TESTFN, "wb") as fp: + pass +jump_across_with.jump = (1, 3) +jump_across_with.output = [] + # This verifies that you can't set f_lineno via _getframe or similar # trickery. def no_jump_without_trace_function(): @@ -750,6 +758,9 @@ class JumpTestCase(unittest.TestCase): # Must set sys.settrace(None) in setUp(), else condition is not # triggered. no_jump_without_trace_function() + def test_jump_across_with(self): + self.addCleanup(support.unlink, support.TESTFN) + self.run_test(jump_across_with) def test_20_large_function(self): d = {} |