Martin Panter added the comment:
It looks like Antoine’s second failure (test_getcode) should be fixed now that
transient_internet() is used (Issue 12138).
Looking at Antoine’s first failure, it will always be possible for it to fail
depending on the conditions of the buildbot, internet, and the www.example.com
server:
def setUp(self):
socket.setdefaulttimeout(self.TIMEOUT)
def testURLread(self):
f = _open_with_retry(urllib.urlopen, "http://www.example.com/")
x = f.read() # Timed out!
I would suggest changing this to connect to a server running on localhost in a
background thread, and moving it into test_urllib.py because it would no longer
need the “network” resource. That should eliminate enough causes of a timeout,
the remaining one being a very slow buildbot, which I don’t think is worth
worrying about.
Also see revision aa46bdbe641d in Python 3, where the read() call was shifted
under the transient_internet() handler, and seems to defeat the purpose of the
test.
----------
nosy: +martin.panter
versions: +Python 2.7
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue10116>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com