mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
[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 e9f2352b7b
)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
parent
4936fa9541
commit
f53871e1e8
1 changed files with 1 additions and 12 deletions
|
@ -513,18 +513,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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue