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.
eamanu
left a comment
There was a problem hiding this comment.
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. |
|
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. |
Also, move NEWS item to right directory.
|
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