-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
gh-139951: Test on GC collection disabled if threshold is zero #140304
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
gh-139951: Test on GC collection disabled if threshold is zero #140304
Conversation
Lib/test/test_gc.py
Outdated
gc.enable() | ||
|
||
# Ensure that setting *threshold0* to zero disables collection. | ||
@gc_threshold(0, 0, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to set gc_threshold(0)
to keep other values defaults.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Overall, I believe it is worth to add such test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks.
Thanks @efimov-mikhail for the PR, and @markshannon for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
…ythonGH-140304) (cherry picked from commit 5d0abb6) Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
…ythonGH-140304) (cherry picked from commit 5d0abb6) Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
GH-140362 is a backport of this pull request to the 3.14 branch. |
GH-140363 is a backport of this pull request to the 3.13 branch. |
|
This PR just adds small test.
I've noticed that there's no such test because CI is green for this PR:
#140262, but it has such a flaw.