-
Notifications
You must be signed in to change notification settings - Fork 235
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
Fix pypy3 tests #482
Comments
xref #485. As a PyPy dev, we have dropped support for PyPy3.6, and are going to drop PyPy3.7 soon. A known issue is that coverage, which on CPython runs as a c-extension and in PyPy runs in pure-python mode, breaks the PyPy JIT so the coverage test run takes 3x-4x more time on PyPy than on CPython. |
Good to know, thanks! As you saw in the PR, I'm trying to get it to work on 3.8. Ah, interesting re. coverage! I have an issue to fix our coverage stuff as well - will keep this in mind then. 👍 |
@mattip Seems adding Any idea why the pypy3-tests on mac took almost 30 minutes compared to roughly one minute on regular python? |
No, that is indeed strange. We expect tests to run 2x slower since that is roughly the speed of our interpreter vs. CPython (without the JIT) and tests typically do not run long enough for the JIT to kick in. How would you suggest I run the tests directly (without tox) so I can profile? |
Put yourself in a venv with pypy3.8 (that's the version used in GHA) and just run |
Edit: I did not properly install the pytest-html plugin in my virtualenv. |
I did not properly install pytest-html. Now I get a different error, the html does not capture the log:
Edit: got it - I had pytest-rerun, not pytest-rerunfailures. they are different. |
On ubuntu 20.04, when I run with PyPy 3.8 I get 20 seconds, with CPython 3.8 10s. This is the 2x I would expect. Running CPython with coverage does not slow down things very much, maybe 11s. On CI, ubuntu20.04, the relationship is again 2x. One windows CI shows a worse ratio: CPython is about 3x slower. I think this is all within the range of expectations. |
That doesn't explain the 4x (without coverage) in GHA, but maybe we just have to live with it: https://github.com/pytest-dev/pytest-html/runs/5768011639?check_suite_focus=true |
I missed the 4x on macOS. Now that we see the problem we can try to work on it. Very strange that macOS and windows are that much slower. @cfbloz. |
Could I add something like this to the test setup to upload |
Absolutely! |
FWIW, I have been running the pytest-html test suite with coverage locally as a kind of real world benchmark for coverage performance (see linked issue). seems we can speed up coverage on pypy for pytest-html (and I suspect many other projects) by a decent amount. |
At least two issues to address here:
The text was updated successfully, but these errors were encountered: