-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
test_sys.test_intern() fails if run more than once in the same process #108963
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
Comments
@serhiy-storchaka: Oh, that another victim of regrtest trying to be nice :-) test_sys pass when run multiple times in the same process using this change:
The interesting part is that |
For reference, the module level counter was added in aee3486 to prevent test_intern failing when it is rerun in verbose mode. But if the module is reloaded, the counter is reset. One of solutions is to use the random module. Possibility of collisions in negligible. Other solution -- use timer in the hope that the computer is not fast enough to finish the whole test several times in the time resolution unit. We can also try to use
|
Trying to change to using
|
… test (python#109491) (cherry picked from commit 44b1e4e)
…n test … (#110216) gh-108963: using random to generate unique string in sys.intern test (#109491) (cherry picked from commit 44b1e4e) Co-authored-by: AN Long <[email protected]>
Bug report
Example:
Linked PRs
The text was updated successfully, but these errors were encountered: