Specialcase 'xs4all' (.nl/.net/.com/whatever else we have) as well as

'python.org' when deciding what server to use for the timeout tests; getting
tired of seeing the test fail on all my boxes ;P This'll still allow the
test to fail for hosts in the XS4ALL network that don't have an 'xs4all'
hostname, so maybe it should use a fallback scheme instead.
This commit is contained in:
Thomas Wouters 2006-04-16 15:22:41 +00:00
parent 631f513fd8
commit 993633c6f2
1 changed files with 2 additions and 1 deletions

View File

@ -113,7 +113,8 @@ class TimeoutTestCase(unittest.TestCase):
# If we are too close to www.python.org, this test will fail. # If we are too close to www.python.org, this test will fail.
# Pick a host that should be farther away. # Pick a host that should be farther away.
if socket.getfqdn().split('.')[-2:] == ['python', 'org']: if (socket.getfqdn().split('.')[-2:] == ['python', 'org'] or
socket.getfqdn().split('.')[-2] == 'xs4all'):
self.addr_remote = ('tut.fi', 80) self.addr_remote = ('tut.fi', 80)
_t1 = time.time() _t1 = time.time()