Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[3.14] gh-135376: Fix and improve test_random (GH-135377) #135680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2025

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 18, 2025

  • 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 c555123)

Co-authored-by: Serhiy Storchaka [email protected]

* 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 c555123)

Co-authored-by: Serhiy Storchaka <[email protected]>
@rhettinger
Copy link
Contributor

I thought we usually didn't backport new tests. This isn't a bugfix.

@serhiy-storchaka serhiy-storchaka merged commit 3ae8a5b into python:3.14 Jun 18, 2025
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants