https://github.com/python/cpython/commit/356e6e219f23d57b05126632bcb5875c41f09ab9
commit: 356e6e219f23d57b05126632bcb5875c41f09ab9
branch: main
author: Neko Asakura <[email protected]>
committer: vstinner <[email protected]>
date: 2026-11-05T14:24:18+01:00
summary:

gh-161336: fix host mismatch in the `test_imaplib` (#161349)

files:
M Lib/test/test_imaplib.py

diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py
index daf5b0ee496c03..51e3412324b72d 100644
--- a/Lib/test/test_imaplib.py
+++ b/Lib/test/test_imaplib.py
@@ -901,9 +901,8 @@ def handle(self):
                 SimpleIMAPHandler.handle(self)
 
         _, server = self._setup(TimeoutHandler)
-        addr = server.server_address[1]
         with self.assertRaises(TimeoutError):
-            client = self.imap_class("localhost", addr, timeout=0.001)
+            client = self.imap_class(*server.server_address, timeout=0.001)
 
     def test_with_statement(self):
         _, server = self._setup(SimpleIMAPHandler, connect=False)

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to