gh-92886: Fixing tests that fail when running with optimizations (-O) in test_sys_settrace.py (GH-93234)

This commit is contained in:
Jack Hindmarch 2022-10-18 16:59:05 +01:00 committed by GitHub
parent db03c8066a
commit debacd9ad5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View file

@ -834,9 +834,8 @@ class TraceTestCase(unittest.TestCase):
(5, 'line'),
(6, 'line'),
(7, 'line'),
(10, 'line'),
(13, 'line'),
(13, 'return')])
(10, 'line')] +
([(13, 'line'), (13, 'return')] if __debug__ else [(10, 'return')]))
def test_continue_through_finally(self):
@ -871,9 +870,8 @@ class TraceTestCase(unittest.TestCase):
(6, 'line'),
(7, 'line'),
(10, 'line'),
(3, 'line'),
(13, 'line'),
(13, 'return')])
(3, 'line')] +
([(13, 'line'), (13, 'return')] if __debug__ else [(3, 'return')]))
def test_return_through_finally(self):

View file

@ -0,0 +1 @@
Fixing tests that fail when running with optimizations (``-O``) in ``test_sys_settrace.py``.