summaryrefslogtreecommitdiff
path: root/Lib/test/test_timeout.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-02-18 21:20:31 +0000
committerNeal Norwitz <nnorwitz@gmail.com>2006-02-18 21:20:31 +0000
commitd5b671508369dd8a33b0370beb3589ef98cbeef2 (patch)
tree181ae70651a5217ee223ac0d84a54e23e3f66b7d /Lib/test/test_timeout.py
parent7b4e7c24df974b2590d5ef332910a020db355546 (diff)
downloadcpython-git-d5b671508369dd8a33b0370beb3589ef98cbeef2.tar.gz
This should get test_timeout to pass when running on any python.org host. Will backport
Diffstat (limited to 'Lib/test/test_timeout.py')
-rw-r--r--Lib/test/test_timeout.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_timeout.py b/Lib/test/test_timeout.py
index 69705593cb..cb19d9eaea 100644
--- a/Lib/test/test_timeout.py
+++ b/Lib/test/test_timeout.py
@@ -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)