[Python-checkins] r42467 - python/branches/release24-maint/Lib/test/test_timeout.py

neal.norwitz python-checkins at python.org
Sat Feb 18 22:25:57 CET 2006


Author: neal.norwitz
Date: Sat Feb 18 22:25:56 2006
New Revision: 42467

Modified:
   python/branches/release24-maint/Lib/test/test_timeout.py
Log:
Backport: This should get test_timeout to pass when running on any python.org host.

Modified: python/branches/release24-maint/Lib/test/test_timeout.py
==============================================================================
--- python/branches/release24-maint/Lib/test/test_timeout.py	(original)
+++ python/branches/release24-maint/Lib/test/test_timeout.py	Sat Feb 18 22:25:56 2006
@@ -111,6 +111,11 @@
         _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)


More information about the Python-checkins mailing list