8000 GH-94438: Fix `RuntimeWarning` for jump tests in `test_sys_settrace` by gaogaotiantian · Pull Request #111341 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-94438: Fix RuntimeWarning for jump tests in test_sys_settrace #111341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 26, 2023
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 8000
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
0