projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c355f0c
)
SF bug #690083: test_random fails sometimes
author
Raymond Hettinger
<python@rcn.com>
Fri, 21 Feb 2003 01:41:36 +0000
(
01:41
+0000)
committer
Raymond Hettinger
<python@rcn.com>
Fri, 21 Feb 2003 01:41:36 +0000
(
01:41
+0000)
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.
Lib/test/test_random.py
patch
|
blob
|
history
diff --git
a/Lib/test/test_random.py
b/Lib/test/test_random.py
index 9a1636a2836ee4cdf79f0d55adce7d8746f7b5ff..50bf00b72cdc745a400aa0fe3f93672fcaa21746 100644
(file)
--- a/
Lib/test/test_random.py
+++ b/
Lib/test/test_random.py
@@
-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)