mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
merge 3.2 (#14612)
This commit is contained in:
commit
6e3358a1d5
3 changed files with 17 additions and 2 deletions
|
@ -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 = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue