-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
bpo-35505: Skip test_imap4_host_default_value if localhost listens on IMAP port #11823
bpo-35505: Skip test_imap4_host_default_value if localhost listens on IMAP port #11823
Conversation
… IMAP port. test_imaplib.TestImaplib.test_imap4_host_default_value fails when run on the computer with the local IMAP server running. This may happen for developers, who consequently don't need to be bothered about this test failing.
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.
lgtm. I don't think that is necessary a news for a new test.
Would it be possible to use a different port instead? Using test.support.find_unused_port() for example. |
Misc/NEWS.d/next/Library/2019-02-12-01-33-08.bpo-35505.N9ba_K.rst
Outdated
Show resolved
Hide resolved
I tested manually. Terminal 1:
Terminal 2:
Without this change, Terminal 1 shows an incoming connection ("Ncat: Connection from ::1:35778.") and the test fails with imaplib.IMAP4.abort: socket error: EOF. With the change: no incoming connection and the test pass as expected. |
Misc/NEWS.d/next/Library/2019-02-12-01-33-08.bpo-35505.N9ba_K.rst
Outdated
Show resolved
Hide resolved
Also, move NEWS item to right directory.
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.
LGTM.
GH-11829 is a backport of this pull request to the 3.7 branch. |
… IMAP port (pythonGH-11823) Make test_imap4_host_default_value independent on whether the local IMAP server is running. (cherry picked from commit 3dc67d0) Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
@mcepl: The patch doesn't apply cleanup on the 2.7 branch. Can you try to write at patch for 2.7? |
@vstinner There is nothing to port to … 2.7 just doesn't have this test case at all. |
Aha :-D Good. I close the issue in that case ;-) |
test_imaplib.TestImaplib.test_imap4_host_default_value fails when run on
the computer with the local IMAP server running. This may happen for
developers, who consequently don't need to be bothered about this test
failing.
https://bugs.python.org/issue35505