From 2dfbd3255eccdf3d7538a20c24afdc0090f037a2 Mon Sep 17 00:00:00 2001 From: Carl Meyer Date: Fri, 19 Mar 2021 13:57:38 -0700 Subject: [PATCH] bpo-43562: fix test_ssl to skip on unreachable network --- Lib/test/test_ssl.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index ade7ef529e8122..7154cc740351cd 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -2301,6 +2301,8 @@ def test_timeout_connect_ex(self): rc = s.connect_ex((REMOTE_HOST, 443)) if rc == 0: self.skipTest("REMOTE_HOST responded too quickly") + elif rc == errno.ENETUNREACH: + self.skipTest("Network unreachable.") self.assertIn(rc, (errno.EAGAIN, errno.EWOULDBLOCK)) @unittest.skipUnless(socket_helper.IPV6_ENABLED, 'Needs IPv6')