Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Sep 11, 2023

libregrtest now calls random.seed() before running each test file when -r/--randomize command line option is used. Moreover, it's also called in worker processes. It should help to make tests more deterministic. Previously, it was only called once in the main process before running all test files and it was not called in worker processes.

  • Convert some f-strings to regular strings in test_regrtest when f-string is not needed.
  • Remove unused all_methods variable from test_regrtest.
  • Add RunTests members are now mandatory.

libregrtest now calls random.seed() before running each test file
when -r/--randomize command line option is used. Moreover, it's also
called in worker processes. It should help to make tests more
deterministic. Previously, it was only called once in the main
process before running all test files and it was not called in worker
processes.

* Convert some f-strings to regular strings in test_regrtest when
  f-string is not needed.
* Remove unused all_methods variable from test_regrtest.
* Add RunTests members are now mandatory.
@vstinner vstinner merged commit a84cb74 into python:main Sep 12, 2023
@vstinner vstinner deleted the regrtest_random branch September 12, 2023 03:35
vstinner added a commit to vstinner/cpython that referenced this pull request Sep 13, 2023
…thon#109279)

libregrtest now calls random.seed() before running each test file
when -r/--randomize command line option is used. Moreover, it's also
called in worker processes. It should help to make tests more
deterministic. Previously, it was only called once in the main
process before running all test files and it was not called in worker
processes.

* Convert some f-strings to regular strings in test_regrtest when
  f-string is not needed.
* Remove unused all_methods variable from test_regrtest.
* Add RunTests members are now mandatory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant