From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 4 Jun 2022 03:38:54 +0000 (-0700) Subject: gh-92886: Fix test that fails when running with `-O` in `test_imaplib.py` (GH-93237) X-Git-Tag: v3.10.5~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b3cf3a2884b130c519fbe271e4d2a762248c2a0;p=thirdparty%2FPython%2Fcpython.git gh-92886: Fix test that fails when running with `-O` in `test_imaplib.py` (GH-93237) (cherry picked from commit 8150b8cf7fe09d601246f5bdc6456a0e31f31bca) Co-authored-by: jackh-ncl <1750152+jackh-ncl@users.noreply.github.com> --- diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py index 30b553746af1..b5c78a5d49c5 100644 --- a/Lib/test/test_imaplib.py +++ b/Lib/test/test_imaplib.py @@ -936,6 +936,7 @@ class ThreadedNetworkedTests(unittest.TestCase): @threading_helper.reap_threads @cpython_only + @unittest.skipUnless(__debug__, "Won't work if __debug__ is False") def test_dump_ur(self): # See: http://bugs.python.org/issue26543 untagged_resp_dict = {'READ-WRITE': [b'']} diff --git a/Misc/NEWS.d/next/Tests/2022-05-25-23-07-15.gh-issue-92886.Aki63_.rst b/Misc/NEWS.d/next/Tests/2022-05-25-23-07-15.gh-issue-92886.Aki63_.rst new file mode 100644 index 000000000000..581f6bfea24b --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2022-05-25-23-07-15.gh-issue-92886.Aki63_.rst @@ -0,0 +1 @@ +Fixing tests that fail when running with optimizations (``-O``) in ``test_imaplib.py``.