diff options
author | Raymond Hettinger <python@rcn.com> | 2002-12-30 00:46:09 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2002-12-30 00:46:09 (GMT) |
commit | dd24a9f3635f57c6740a4f09a4d86bfadb184381 (patch) | |
tree | 564798d9e470a682cee58ec0be5278986cd0b619 | |
parent | 4647f5090a82811c0bf17efae22ad421d6ae2011 (diff) | |
download | cpython-dd24a9f3635f57c6740a4f09a4d86bfadb184381.zip cpython-dd24a9f3635f57c6740a4f09a4d86bfadb184381.tar.gz cpython-dd24a9f3635f57c6740a4f09a4d86bfadb184381.tar.bz2 |
This test depends on the exact ordering produced by the WichmannHill
random number generator. Altered it a bit to use the old generator
and restore the test.
-rw-r--r-- | Lib/test/test_generators.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py index 9078b55..c72fae7 100644 --- a/Lib/test/test_generators.py +++ b/Lib/test/test_generators.py @@ -444,15 +444,15 @@ Subject: Re: PEP 255: Simple Generators >>> roots = sets[:] >>> import random ->>> random.seed(42) +>>> gen = random.WichmannHill(42) >>> while 1: ... for s in sets: ... print "%s->%s" % (s, s.find()), ... print ... if len(roots) > 1: -... s1 = random.choice(roots) +... s1 = gen.choice(roots) ... roots.remove(s1) -... s2 = random.choice(roots) +... s2 = gen.choice(roots) ... s1.union(s2) ... print "merged", s1, "into", s2 ... else: |