]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-110332: Remove mentions of `random.WichmannHill` from `test_zlib` (#110334)
authorNikita Sobolev <mail@sobolevn.me>
Wed, 4 Oct 2023 10:51:45 +0000 (13:51 +0300)
committerGitHub <noreply@github.com>
Wed, 4 Oct 2023 10:51:45 +0000 (12:51 +0200)
Lib/test/test_zlib.py

index 9a099adc74f4b4e7aaf881089c30d4505765d862..1dc8b91a453f9272dae3989defef21345319b137 100644 (file)
@@ -512,18 +512,7 @@ class CompressObjectTestCase(BaseCompressTestCase, unittest.TestCase):
 
         # Try 17K of data
         # generate random data stream
-        try:
-            # In 2.3 and later, WichmannHill is the RNG of the bug report
-            gen = random.WichmannHill()
-        except AttributeError:
-            try:
-                # 2.2 called it Random
-                gen = random.Random()
-            except AttributeError:
-                # others might simply have a single RNG
-                gen = random
-        gen.seed(1)
-        data = gen.randbytes(17 * 1024)
+        data = random.randbytes(17 * 1024)
 
         # compress, sync-flush, and decompress
         first = co.compress(data)