Skip to content

Commit f53871e

Browse files
[3.12] gh-110332: Remove mentions of random.WichmannHill from test_zlib (GH-110334) (#110349)
gh-110332: Remove mentions of `random.WichmannHill` from `test_zlib` (GH-110334) (cherry picked from commit e9f2352) Co-authored-by: Nikita Sobolev <[email protected]>
1 parent 4936fa9 commit f53871e

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

Lib/test/test_zlib.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -513,18 +513,7 @@ def test_odd_flush(self):
513513

514514
# Try 17K of data
515515
# generate random data stream
516-
try:
517-
# In 2.3 and later, WichmannHill is the RNG of the bug report
518-
gen = random.WichmannHill()
519-
except AttributeError:
520-
try:
521-
# 2.2 called it Random
522-
gen = random.Random()
523-
except AttributeError:
524-
# others might simply have a single RNG
525-
gen = random
526-
gen.seed(1)
527-
data = gen.randbytes(17 * 1024)
516+
data = random.randbytes(17 * 1024)
528517

529518
# compress, sync-flush, and decompress
530519
first = co.compress(data)

0 commit comments

Comments
 (0)