gh-135376: Fix and improve test_random by serhiy-storchaka · Pull Request #135377 · python/cpython · GitHub
Skip to content

gh-135376: Fix and improve test_random - #135377

Merged
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:test-random
Jun 18, 2025
Merged

serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:test-random

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jun 11, 2025

Copy link
Copy Markdown
Member
  • 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().

@serhiy-storchaka serhiy-storchaka added tests Tests in the Lib/test dir skip news needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Jun 11, 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().
Comment thread Lib/test/test_random.py Outdated
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
@rhettinger rhettinger removed needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Jun 16, 2025
@rhettinger
rhettinger removed their request for review June 16, 2025 23:53
@serhiy-storchaka
serhiy-storchaka merged commit c555123 into python:main Jun 18, 2025
@serhiy-storchaka
serhiy-storchaka deleted the test-random branch June 18, 2025 15:26
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.14 bugs and security fixes label Jun 18, 2025
@miss-islington-app

Copy link
Copy Markdown

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request 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 <storchaka@gmail.com>
@bedevere-app

bedevere-app Bot commented Jun 18, 2025

Copy link
Copy Markdown

GH-135680 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jun 18, 2025
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.13 bugs and security fixes label Jun 18, 2025
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington-app

Copy link
Copy Markdown

@serhiy-storchaka serhiy-storchaka removed the needs backport to 3.13 bugs and security fixes label Jun 18, 2025
serhiy-storchaka added a commit that referenced this pull request 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 <storchaka@gmail.com>
lkollar pushed a commit to lkollar/cpython that referenced this pull request Jun 19, 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().
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 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().
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 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().
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 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().
@serhiy-storchaka serhiy-storchaka removed their assignment Jul 15, 2026
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