Skip to content

Commit ccadcf9

Browse files
[3.14] gh-161336: fix host mismatch in the test_imaplib (GH-161349) (#161425)
gh-161336: fix host mismatch in the `test_imaplib` (GH-161349) (cherry picked from commit 356e6e2) Co-authored-by: Neko Asakura <neko.asakura@outlook.com>
1 parent 9afffbc commit ccadcf9

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎Lib/test/test_imaplib.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -746,9 +746,8 @@ def handle(self):
746746
SimpleIMAPHandler.handle(self)
747747

748748
_, server = self._setup(TimeoutHandler)
749-
addr = server.server_address[1]
750749
with self.assertRaises(TimeoutError):
751-
client = self.imap_class("localhost", addr, timeout=0.001)
750+
client = self.imap_class(*server.server_address, timeout=0.001)
752751

753752
def test_with_statement(self):
754753
_, server = self._setup(SimpleIMAPHandler, connect=False)

0 commit comments

Comments
 (0)