mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
This should get test_timeout to pass when running on any python.org host. Will backport
This commit is contained in:
parent
7b4e7c24df
commit
d5b6715083
1 changed files with 5 additions and 0 deletions
|
|
@ -111,6 +111,11 @@ class TimeoutTestCase(unittest.TestCase):
|
|||
_timeout = 0.001
|
||||
self.sock.settimeout(_timeout)
|
||||
|
||||
# If we are too close to www.python.org, this test will fail.
|
||||
# Pick a host that should be farther away.
|
||||
if socket.getfqdn().split('.')[-2:] == ['python', 'org']:
|
||||
self.addr_remote = ('python.net', 80)
|
||||
|
||||
_t1 = time.time()
|
||||
self.failUnlessRaises(socket.error, self.sock.connect,
|
||||
self.addr_remote)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue