Skip to content

Commit

Permalink
gh-92886: Fixing tests that fail when running with optimizations (`-O…
Browse files Browse the repository at this point in the history
…`) in `test_sys_settrace.py` (GH-93234)
  • Loading branch information
jackh-ncl authored Oct 18, 2022
1 parent db03c80 commit debacd9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Lib/test/test_sys_settrace.py
Original file line number Diff line number Diff line change
Expand Up @@ -834,9 +834,8 @@ def func():
(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):

Expand Down Expand Up @@ -871,9 +870,8 @@ def func():
(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):

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixing tests that fail when running with optimizations (``-O``) in ``test_sys_settrace.py``.

0 comments on commit debacd9

Please sign in to comment.