summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 6970559..cb19d9e 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)