diff --git a/Lib/test/support.py b/Lib/test/support.py --- a/Lib/test/support.py +++ b/Lib/test/support.py @@ -908,6 +908,11 @@ def transient_internet(resource_name, *, ('ENETUNREACH', 101), ('ETIMEDOUT', 110), ] + if sys.platform == 'win32': + default_errnos.extend(( + ('WSAENOTCONN', 10057), + ('WSAECONNREFUSED', 10061), + )) default_gai_errnos = [ ('EAI_NONAME', -2), ('EAI_NODATA', -5),