Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

libregrtest should always setrandom.seed #110171

Closed
Assignees
sobolevn
Labels
testsTests in the Lib/test dirtype-featureA feature request or enhancement
@sobolevn

Description

@sobolevn

Feature or enhancement

While working on#110160 I've noticed that it is rather hard to reproduce random test failures. So, I want to propose a new feature / fix for that.

First of all, there's existing prior work of@vstinner who added--randseed flag.
Right now it is used together with-r to randomize test order and seeding random.

I propose to:

  • Split--randseed into two options: test order randomization andrandom.seed usage
  • Let's keep-r as-is
  • Let's add--no-use-randseed flag to disable settingrandom.seed, let's always seed random by default
  • Always print information about current random seed to be able to reuse it in the next runs

Example:

» ./python.exe -m test test_regrtestUsing random seed 659064820:00:00 load avg: 1.55 Run 1 test sequentially0:00:00 load avg: 1.55 [1/1] test_regrtest== Tests result: SUCCESS ==1 test OK.Total duration: 12.7 secTotal tests: run=102 skipped=2Total test files: run=1/1Result: SUCCESS

Basically, this is howhttps://github.com/pytest-dev/pytest-randomly works.

I have a PR ready.

Linked PRs

Metadata

Metadata

Assignees

Labels

testsTests in the Lib/test dirtype-featureA feature request or enhancement

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp