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
Adds test case for JUMP_IS_NONE
  • Loading branch information
savannahostrowski committed Oct 22, 2023
commit cbde4e9091459fc8fc729464ed5c581a9b5a548b
8 changes: 8 additions & 0 deletions Lib/test/test_sys_settrace.py
Original file line number Diff line number Diff line change
Expand Up @@ -2064,6 +2064,14 @@ def test_jump_simple_backwards(output):
output.append(1)
output.append(2)

@jump_test(1, 4, [])
def test_jump_is_none_forward(output):
x = None
if x is None:
output.append(1)
else:
output.append(2)

@jump_test(3, 5, [2, 5], warning=(RuntimeWarning, unbound_locals))
def test_jump_out_of_block_forwards(output):
for i in 1, 2:
Expand Down