SF bug #690083: test_random fails sometimes

time.sleep(1) sometimes delays for fractionally less than a second
resulting in too short of an interval for C's time.time() function
to create a distinct seed.
This commit is contained in:
Raymond Hettinger 2003-02-21 01:41:36 +00:00
parent c355f0cae9
commit 785d0a37e5
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ class TestBasicOps(unittest.TestCase):
def test_autoseed(self):
self.gen.seed()
state1 = self.gen.getstate()
time.sleep(1)
time.sleep(1.1)
self.gen.seed() # diffent seeds at different times
state2 = self.gen.getstate()
self.assertNotEqual(state1, state2)