Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix RuntimeWarning for jump tests
  • Loading branch information
gaogaotiantian committed Oct 26, 2023
commit ef1fce7c0e89430324ba17749c237fd256657375
4 changes: 2 additions & 2 deletions Lib/test/test_sys_settrace.py
Original file line number Diff line number Diff line change
Expand Up @@ -2064,7 +2064,7 @@ def test_jump_simple_backwards(output):
output.append(1)
output.append(2)

@jump_test(1, 4, [5])
@jump_test(1, 4, [5], warning=(RuntimeWarning, unbound_locals))
def test_jump_is_none_forwards(output):
x = None
if x is None:
Expand All @@ -2081,7 +2081,7 @@ def test_jump_is_none_backwards(output):
output.append(5)
output.append(6)

@jump_test(1, 4, [5])
@jump_test(2, 4, [5])
def test_jump_is_not_none_forwards(output):
x = None
if x is not None:
Expand Down