diff options
author | Mark Shannon <mark@hotpy.org> | 2023-10-31 10:09:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-31 10:09:54 (GMT) |
commit | d27acd4461ee603bcf6f4a81ca6afccc9fc87331 (patch) | |
tree | b989f6c029b1350612cc9df07d0d027df2a745d8 /Lib/test/test_monitoring.py | |
parent | e3353c498d79f0f3f108a9baf8807a12e77c2ebe (diff) | |
download | cpython-d27acd4461ee603bcf6f4a81ca6afccc9fc87331.zip cpython-d27acd4461ee603bcf6f4a81ca6afccc9fc87331.tar.gz cpython-d27acd4461ee603bcf6f4a81ca6afccc9fc87331.tar.bz2 |
GH-111485: Increment `next_instr` consistently at the start of the instruction. (GH-111486)
Diffstat (limited to 'Lib/test/test_monitoring.py')
-rw-r--r-- | Lib/test/test_monitoring.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/Lib/test/test_monitoring.py b/Lib/test/test_monitoring.py index 3b8ecb7..d12cd96 100644 --- a/Lib/test/test_monitoring.py +++ b/Lib/test/test_monitoring.py @@ -1378,15 +1378,16 @@ class TestBranchAndJumpEvents(CheckEvents): x = 4 else: x = 6 + 7 self.check_events(func, recorders = JUMP_AND_BRANCH_RECORDERS, expected = [ ('branch', 'func', 2, 2), - ('branch', 'func', 3, 4), + ('branch', 'func', 3, 6), ('jump', 'func', 6, 2), ('branch', 'func', 2, 2), - ('branch', 'func', 3, 3), + ('branch', 'func', 3, 4), ('jump', 'func', 4, 2), - ('branch', 'func', 2, 2)]) + ('branch', 'func', 2, 7)]) self.check_events(func, recorders = JUMP_BRANCH_AND_LINE_RECORDERS, expected = [ ('line', 'get_events', 10), @@ -1394,17 +1395,18 @@ class TestBranchAndJumpEvents(CheckEvents): ('line', 'func', 2), ('branch', 'func', 2, 2), ('line', 'func', 3), - ('branch', 'func', 3, 4), + ('branch', 'func', 3, 6), ('line', 'func', 6), ('jump', 'func', 6, 2), ('line', 'func', 2), ('branch', 'func', 2, 2), ('line', 'func', 3), - ('branch', 'func', 3, 3), + ('branch', 'func', 3, 4), ('line', 'func', 4), ('jump', 'func', 4, 2), ('line', 'func', 2), - ('branch', 'func', 2, 2), + ('branch', 'func', 2, 7), + ('line', 'func', 7), ('line', 'get_events', 11)]) def test_except_star(self): @@ -1434,7 +1436,7 @@ class TestBranchAndJumpEvents(CheckEvents): ('line', 'meth', 1), ('jump', 'func', 5, 5), ('jump', 'func', 5, '[offset=114]'), - ('branch', 'func', '[offset=120]', '[offset=122]'), + ('branch', 'func', '[offset=120]', '[offset=124]'), ('line', 'get_events', 11)]) self.check_events(func, recorders = FLOW_AND_LINE_RECORDERS, expected = [ @@ -1450,7 +1452,7 @@ class TestBranchAndJumpEvents(CheckEvents): ('return', None), ('jump', 'func', 5, 5), ('jump', 'func', 5, '[offset=114]'), - ('branch', 'func', '[offset=120]', '[offset=122]'), + ('branch', 'func', '[offset=120]', '[offset=124]'), ('return', None), ('line', 'get_events', 11)]) |