]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-135376: Fix and improve test_random (GH-135377) (GH-135680)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 18 Jun 2025 15:51:47 +0000 (17:51 +0200)
committerGitHub <noreply@github.com>
Wed, 18 Jun 2025 15:51:47 +0000 (15:51 +0000)
commit3ae8a5bed304d2ebd9930f04912ead715ba66f00
tree7e838ee9fa30f34ee46721549d38f768ffcf334c
parentbb9927005ffd7e4dc337a1f52524820601f31222
[3.14] gh-135376: Fix and improve test_random (GH-135377) (GH-135680)

* 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().
(cherry picked from commit c55512311b7cb8b7c27c19f56cd8f872be29aedc)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_random.py