bpo-42413: socket.timeout is now an alias of TimeoutError (GH-23413)
Signed-off-by: Christian Heimes <christian@python.org>
diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py
index 96bcb09..0cab789 100644
--- a/Lib/test/test_imaplib.py
+++ b/Lib/test/test_imaplib.py
@@ -476,7 +476,7 @@ def handle(self):
_, server = self._setup(TimeoutHandler)
addr = server.server_address[1]
- with self.assertRaises(socket.timeout):
+ with self.assertRaises(TimeoutError):
client = self.imap_class("localhost", addr, timeout=0.001)
def test_with_statement(self):