-
Notifications
You must be signed in to change notification settings - Fork 194
Run CI tests with pytest-xdist #685
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
conftest.py moved to enable reset_mp_globals() fixture for doctests Closes mpmath#99
Obviously it is useful to be able to run the tests in parallel locally so this is good. When I've tried to use One potential downside is that if the tests fail because of something hanging then it can be difficult to know from the xdist output which test has failed which is particularly awkward if the failure is seen in CI but not locally. I haven't found anything better for this than using pytest's verbose mode to print out each test name as it starts and finishes. |
Well, we have 5-8 min's in this pr for py3.10/11 and 8-11 in the master.
And we can drop workarounds for resetting globals (dps, prec, etc).
I don't think it's a special downside of the xdist plugin. Same will be for plain pytest.
Probably we could use the pytest-timeout plugin with some "big enough" default. |
Okay, that's good. That didn't happen when I tried before.
No because plain pytest shows which test module it is currently working on and how many tests have already run like:
With xdist the default output is just
If one of the two workers hangs then the other will complete the test suite and it will just show that it's stuck at 99%.
That's probably a better idea. None of the tests here take that long. |
Maybe it would be better not to have tests/doctests that modify the globals in the first place (i.e. gh-683). |
Neither variant shows a test that hangs.
But I doubt we should add such dependency right now.
Sure, but that's a different issue. |
Closes #99