aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_sys_settrace.py
diff options
context:
space:
mode:
authorJack Hindmarch <1750152+jackh-ncl@users.noreply.github.com>2022-10-18 16:59:05 +0100
committerGitHub <noreply@github.com>2022-10-18 16:59:05 +0100
commitdebacd9ad51eaeedac5517404de5ead3f2258c22 (patch)
treea9fc011f163afa7fdfd28a1ef376f2edcc09f7b3 /Lib/test/test_sys_settrace.py
parentdb03c8066a6b12fa23618f9add0eb795936726b4 (diff)
downloadcpython-debacd9ad51eaeedac5517404de5ead3f2258c22.tar.gz
cpython-debacd9ad51eaeedac5517404de5ead3f2258c22.zip
gh-92886: Fixing tests that fail when running with optimizations (`-O`) in `test_sys_settrace.py` (GH-93234)
Diffstat (limited to 'Lib/test/test_sys_settrace.py')
-rw-r--r--Lib/test/test_sys_settrace.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/Lib/test/test_sys_settrace.py b/Lib/test/test_sys_settrace.py
index aa61f8b1858..4f577c2ea5d 100644
--- a/Lib/test/test_sys_settrace.py
+++ b/Lib/test/test_sys_settrace.py
@@ -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):