New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-92886: Fixing test that fails when running with optimizations (-O
) in test_imaplib.py
#93237
Conversation
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
@@ -939,6 +939,7 @@ def test_with_statement_logout(self): | |||
|
|||
@threading_helper.reap_threads | |||
@cpython_only | |||
@unittest.skipUnless(__debug__, "Won't work if __debug__ is False") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_mesg()
@ Lib/imaplib.py:1247
is defined within a if __debug__
block, so I assume this test can be skipped when running with optimizations.
Thanks @jackh-ncl for the PR, and @JelleZijlstra for merging it |
…maplib.py` (pythonGH-93237) (cherry picked from commit 8150b8c) Co-authored-by: jackh-ncl <1750152+jackh-ncl@users.noreply.github.com>
GH-93484 is a backport of this pull request to the 3.11 branch. |
…maplib.py` (pythonGH-93237) (cherry picked from commit 8150b8c) Co-authored-by: jackh-ncl <1750152+jackh-ncl@users.noreply.github.com>
GH-93485 is a backport of this pull request to the 3.10 branch. |
#92886
Before:
After:
./python.exe -Om unittest test.test_zipimport ... ---------------------------------------------------------------------- Ran 103 tests in 6.156s OK (skipped=56)