[3.12] gh-93691: fix too broad source locations of for statement iterators (GH-120330 (#120405)

[3.12] gh-93691: fix too broad source locations of for statement iterators (GH-120330).
(cherry picked from commit 97b69db167)
This commit is contained in:
Irit Katriel 2024-06-13 11:38:36 +01:00 committed by GitHub
parent 89523230d8
commit 5a6cc3c67f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 63 additions and 8 deletions

View file

@ -1634,15 +1634,15 @@ class TraceTestCase(unittest.TestCase):
EXPECTED_EVENTS = [
(0, 'call'),
(2, 'line'),
(1, 'line'),
(-3, 'call'),
(-2, 'line'),
(-2, 'return'),
(4, 'line'),
(1, 'line'),
(4, 'line'),
(2, 'line'),
(-2, 'call'),
(-2, 'return'),
(1, 'return'),
(2, 'return'),
]
# C level events should be the same as expected and the same as Python level.