-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
Make tests more PyPy compatible #69317
Comments
PyPy includes modified Python 2.7 tests for testing compatibility. Some of changes skips tests for features that are not implemented in PyPy or are CPython specific, some reflects differences between error types or messages in CPython and PyPy, some are needed because PyPy doesn't use reference counting, some are workarounds for known PyPy or CPython bugs. The purpose of this issue is to port harmless non PyPy-specific changes. I'll split full patch on several parts for easier review. The first patch in a series just adds gc.collect() or test.test_support.gc_collect() calls to force calling destructors or freeing memory. |
Left some comments. There are a few test cases that I suspect are relying on side effects of garbage collection to perform some other test, and it would be better to rework the test. In the other cases, I agree that actual garbage collection behaviour is being tested, and it makes sense to call gc_collect() or similar. |
Thank you for your comments Martin. I need a time to think over them and provide alternative solutions that less depend on garbage collecting. May be Maciej can answer questions about causes of some PyPy changes. |
Just for reference here is a full difference between 2.7 tests in PyPy and CPython. It makes tests fail in CPython and skips some tests or makes them too lenient. |
Hi I can answer precise questions, which tests are you asking about? Note that if the point is to unify the test suite, would be cool to make changes to both pypy and cpython and not just change cpython one. |
Maciej: I put a few questions and comments in the code review. See the <https://bugs.python.org/review/25130/#ps15551\> (also linked next to Serhiy’s first patch). |
Hi Looking through your comments, yes, maybe those tests or those things require fixing. We at pypy don't have enough will to fight python-dev most of the time, so the usual approach is to do "minimal hack that works" without trying to dwelve into why this or that works that way. Obviously feel free to fix the underlaying issue, we'll be happy to commit it to pypy |
With 2.7 EOL, is this still relevant? |
Unfortunately Martin's comments are not available now, after shutting down the Rietveld service. Here is a new PR which contains extraction of PyPy changes related to calling gc.collect() for 3.8. I removed changes which look specific for PyPy and left changes which look common for every implementation without reference counting. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: