Try to narrow window of failure on slow/busy boxes (ppc64 buildbot)

This commit is contained in:
Neal Norwitz 2006-06-15 05:55:49 +00:00
parent fe7d0c3bc6
commit de7f502879
1 changed files with 8 additions and 4 deletions

View File

@ -193,13 +193,17 @@ class TimeTestCase(unittest.TestCase):
time.ctime(None)
def test_gmtime_without_arg(self):
t0 = time.mktime(time.gmtime())
t1 = time.mktime(time.gmtime(None))
gt0 = time.gmtime()
gt1 = time.gmtime(None)
t0 = time.mktime(gt0)
t1 = time.mktime(gt1)
self.assert_(0 <= (t1-t0) < 0.2)
def test_localtime_without_arg(self):
t0 = time.mktime(time.localtime())
t1 = time.mktime(time.localtime(None))
lt0 = time.localtime()
lt1 = time.localtime(None)
t0 = time.mktime(lt0)
t1 = time.mktime(lt1)
self.assert_(0 <= (t1-t0) < 0.2)
def test_main():