mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #23387: Skip test_issue16464 if it raises an 5xx error.
Also, remove support.run_doctest() since there is no doctests in test_urllib2 and urllib.request.
This commit is contained in:
parent
6e820c0548
commit
bcdfc6a1fa
2 changed files with 13 additions and 21 deletions
|
@ -1324,6 +1324,8 @@ def transient_internet(resource_name, *, timeout=30.0, errnos=()):
|
|||
n = getattr(err, 'errno', None)
|
||||
if (isinstance(err, socket.timeout) or
|
||||
(isinstance(err, socket.gaierror) and n in gai_errnos) or
|
||||
(isinstance(err, urllib.error.HTTPError) and
|
||||
500 <= err.code <= 599) or
|
||||
(isinstance(err, urllib.error.URLError) and
|
||||
"ConnectionRefusedError" in err.reason) or
|
||||
n in captured_errnos):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue