diff options
author | Raymond Hettinger <python@rcn.com> | 2003-08-09 18:30:57 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-08-09 18:30:57 (GMT) |
commit | 3081d59f920229b26293c7a3ee3f1a9da0da53e9 (patch) | |
tree | 08061aabfcbf2b426df2b79277079411778d5e8d /Lib/test/test_random.py | |
parent | 39a682f5f223fb988ba634ba74e20b2b490cb333 (diff) | |
download | cpython-3081d59f920229b26293c7a3ee3f1a9da0da53e9.zip cpython-3081d59f920229b26293c7a3ee3f1a9da0da53e9.tar.gz cpython-3081d59f920229b26293c7a3ee3f1a9da0da53e9.tar.bz2 |
SF bug #778964: bad seed in python 2.3 random
The default seed is time.time().
Multiplied by 256 before truncating so that fractional seconds are used.
This way, two successive calls to random.seed() are much more likely
to produce different sequences.
Diffstat (limited to 'Lib/test/test_random.py')
-rw-r--r-- | Lib/test/test_random.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py index ea2243d..c9103e8 100644 --- a/Lib/test/test_random.py +++ b/Lib/test/test_random.py @@ -20,7 +20,7 @@ class TestBasicOps(unittest.TestCase): def test_autoseed(self): self.gen.seed() state1 = self.gen.getstate() - time.sleep(1.1) + time.sleep(0.1) self.gen.seed() # diffent seeds at different times state2 = self.gen.getstate() self.assertNotEqual(state1, state2) |