Skip to content

Commit a475d58

Browse files
[3.15] gh-161336: fix host mismatch in the test_imaplib (GH-161349) (#161424)
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 98232ac commit a475d58

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
@@ -740,9 +740,8 @@ def handle(self):
740740
SimpleIMAPHandler.handle(self)
741741

742742
_, server = self._setup(TimeoutHandler)
743-
addr = server.server_address[1]
744743
with self.assertRaises(TimeoutError):
745-
client = self.imap_class("localhost", addr, timeout=0.001)
744+
client = self.imap_class(*server.server_address, timeout=0.001)
746745

747746
def test_with_statement(self):
748747
_, server = self._setup(SimpleIMAPHandler, connect=False)

0 commit comments

Comments
 (0)