From 2586c50bded8d39dfd0ff10ee88a852417c76625 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Thu, 20 Sep 2018 18:08:57 +0300 Subject: [PATCH] bpo-19756: Prevent test failures due to EADDRNOTAVAIL (GH-9446) (cherry picked from commit 8213eaddf3ce8e87564d2949454903a1484748b5) Co-authored-by: Berker Peksag --- Lib/test/support/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index 2ad563469ae3a5..4127b50d1fbb7d 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -1408,6 +1408,9 @@ def transient_internet(resource_name, *, timeout=30.0, errnos=()): ('EHOSTUNREACH', 113), ('ENETUNREACH', 101), ('ETIMEDOUT', 110), + # socket.create_connection() fails randomly with + # EADDRNOTAVAIL on Travis CI. + ('EADDRNOTAVAIL', 99), ] default_gai_errnos = [ ('EAI_AGAIN', -3),