You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#135326 exposed the fact that there was no tests for objects implementing __index__ in test_random, even if some code in the random module explicitly support them.
When trying to add more tests, I discovered that
Some code is literally duplicated for Random and SystemRandom tests. It is easy to make error by modifying only only one of the copy.
As consequence of this, some tests were only added for SystemRandom, even if they are not specific for SystemRandom.
There was also no tests for randint().
So the following PR reorganizes test_random: removes duplicated code, makes sure that implementation agnostic tests are run for both classes, and add few new tests.
* Remove duplicated code. Tests for Random and SystemRandom now share
the code.
* Move implementation agnostic tests that was only run for SystemRandom,
so they are now run for Random too.
* Add tests for __index__() support.
* Add tests for randint().
* Remove duplicated code. Tests for Random and SystemRandom now share
the code.
* Move implementation agnostic tests that was only run for SystemRandom,
so they are now run for Random too.
* Add tests for __index__() support.
* Add tests for randint().
Uh oh!
There was an error while loading. Please reload this page.
#135326 exposed the fact that there was no tests for objects implementing
__index__
intest_random
, even if some code in therandom
module explicitly support them.When trying to add more tests, I discovered that
There was also no tests for
randint()
.So the following PR reorganizes
test_random
: removes duplicated code, makes sure that implementation agnostic tests are run for both classes, and add few new tests.Linked PRs
The text was updated successfully, but these errors were encountered: