Kaydet (Commit) 89b84b02 authored tarafından Miss Islington (bot)'s avatar Miss Islington (bot) Kaydeden (comit) Victor Stinner

Fix test_socket.test_create_connection() (GH-4206) (#4208)

bpo-31910: test_create_connection() now catchs also EADDRNOTAVAIL to
fix the test on Travis CI.
(cherry picked from commit 280c22a8)
üst f44a6299
......@@ -4373,6 +4373,10 @@ class NetworkConnectionNoServer(unittest.TestCase):
expected_errnos = [ errno.ECONNREFUSED, ]
if hasattr(errno, 'ENETUNREACH'):
expected_errnos.append(errno.ENETUNREACH)
if hasattr(errno, 'EADDRNOTAVAIL'):
# bpo-31910: socket.create_connection() fails randomly
# with EADDRNOTAVAIL on Travis CI
expected_errnos.append(errno.EADDRNOTAVAIL)
self.assertIn(cm.exception.errno, expected_errnos)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment