This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients pitrou, serhiy.storchaka, vstinner
Date 2017-08-17.15:46:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1502984787.66.0.502883920393.issue31227@psf.upfronthosting.co.za>
In-reply-to
Content
Antoine Pitrou: "If refleaks depend on the random seed, perhaps it's a bug worth fixing?"

I propose to change regrtest behaviour even when -R is not used, to make regrtest more deterministic.

Currently, when you run "./python -m test -r test_xxx test_yyyy", it's hard to guess the state of the RNG in test_yyy: it depends on many bytes were consumed by test_xxx. For example, if test_xxx is run on a buildbot, but skipped when I run it locally: we get a different behaviour.

I would prefer that test_yyy behaves the same when run with "./python -m test -r --randseed=5 test_xxx test_yyyy" (with test_xxx) and with "./python -m test -r --randseed=5 test_yyyy" (without test_xxx).

With my change, "./python -m test -r --randseed=5 test_yyyy test_yyyy" (sequential) and "./python -m test -r --randseed=5 -j2 test_yyyy test_yyyy" (parallel) runs test_yyy twice with the RNG in the same state.

Proposed change is part of a more global project to reduce side effects of tests, to make tests more reproductible and more "isolated".
History
Date User Action Args
2017-08-17 15:46:27vstinnersetrecipients: + vstinner, pitrou, serhiy.storchaka
2017-08-17 15:46:27vstinnersetmessageid: <1502984787.66.0.502883920393.issue31227@psf.upfronthosting.co.za>
2017-08-17 15:46:27vstinnerlinkissue31227 messages
2017-08-17 15:46:27vstinnercreate