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 <mail@sobolevn.me>
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

Lines changed: 1 addition & 12 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy