-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Here's the problematic code:
Lines 513 to 525 in 1465386
| # 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) |
It always fails with AttributeError, because random.WichmannHill() does not exist.
This is some old compatibility class that was removed a long time ago:
The attributes random.whseed and random.__whseed have no meaning for
the new generator. Code using these attributes should switch to a
new class, random.WichmannHill which is provided for backward
compatibility and to make an alternate generator available.
So, I propose to simplify this test.
Linked PRs
Metadata
Metadata
Assignees
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error