From 4174af2cfcf838c4f61f7fa06bdb56d028962c6b Mon Sep 17 00:00:00 2001 From: Jack Hindmarch Date: Wed, 25 May 2022 23:40:40 +0100 Subject: [PATCH 1/2] Fixing tests that fail when running with optimizations (`-O`) in `test_sys_settrace.py` --- Lib/test/test_sys_settrace.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Lib/test/test_sys_settrace.py b/Lib/test/test_sys_settrace.py index 162fd8328582ca..917eebd2db1e3f 100644 --- a/Lib/test/test_sys_settrace.py +++ b/Lib/test/test_sys_settrace.py @@ -833,9 +833,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): @@ -870,9 +869,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): From f0979541988616d768c9390428bcb196c9b634d5 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Wed, 25 May 2022 22:43:11 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Tests/2022-05-25-22-43-11.gh-issue-92886.9HQb9e.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Tests/2022-05-25-22-43-11.gh-issue-92886.9HQb9e.rst diff --git a/Misc/NEWS.d/next/Tests/2022-05-25-22-43-11.gh-issue-92886.9HQb9e.rst b/Misc/NEWS.d/next/Tests/2022-05-25-22-43-11.gh-issue-92886.9HQb9e.rst new file mode 100644 index 00000000000000..0c5870441c3b77 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2022-05-25-22-43-11.gh-issue-92886.9HQb9e.rst @@ -0,0 +1 @@ +Fixing tests that fail when running with optimizations (``-O``) in ``test_sys_settrace.py``.