Skip to content

Commit d507493

Browse files
[3.11] gh-110332: Remove mentions of random.WichmannHill from test_zlib (GH-110334) (#110348)
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 497c8c4 commit d507493

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

Lib/test/test_zlib.py

+1-12
Original file line numberDiff line numberDiff line change
@@ -516,18 +516,7 @@ def test_odd_flush(self):
516516

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

532521
# compress, sync-flush, and decompress
533522
first = co.compress(data)

0 commit comments

Comments
 (0)