-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
TST: Make refcount tests more resilient to Python changes #29970
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
Conversation
Check the change of the refcount, instead of the absolute value, as suggested by @ngoldbaum.
qk.remove() | ||
assert sys.getrefcount(qk) == 2 | ||
assert sys.getrefcount(qk) < orig_refcount |
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.
assert sys.getrefcount(qk) < orig_refcount | |
assert sys.getrefcount(qk) == orig_refcount - 1 |
? If not, feel free to self merge.
Testing this I also found pandas-dev/pandas#61368 |
Merging this on top of #29393 the two reference count tests pass again (I also see a pandas failure, a webagg failure, and all the sphinx tests fail (but those look like installation / build issues from some c-extension caused by wheels), a tz test that is a dependency installation issue, and something with pgf that I have not investigated yet). |
… to Python changes
…970-on-v3.10.x Backport PR #29970 on branch v3.10.x (TST: Make refcount tests more resilient to Python changes)
PR summary
Check the change of the refcount, instead of the absolute value, as suggested by @ngoldbaum in #29959 (comment).
I did not test against Python 3.14, but perhaps @befeleme could.
PR checklist