-
Notifications
You must be signed in to change notification settings - Fork 591
Use pytest-xdist
in unit testing
#7624
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (41.42%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage.
Additional details and impacted files@@ Coverage Diff @@
## main #7624 +/- ##
===========================================
- Coverage 96.35% 41.42% -54.94%
===========================================
Files 150 152 +2
Lines 32317 32565 +248
Branches 4080 4146 +66
===========================================
- Hits 31139 13489 -17650
- Misses 571 18276 +17705
- Partials 607 800 +193 |
Looks like there are problems with trying to simultaneously handle the same file when downloading it or transferring it from the local vtk-data repo clone. We could consider using Also getting errors about the naming/ordering of tests being consistent in some cases. |
The speedups do look promising. We could also try directly adding a hook to the dataset loader class, and always make a temp copy of the files before loading and use a CI-specific flag to control this.
In the docs I did see that using parametrize with sets can be problematic, might need to look over some of these and use lists instead |
We're getting some mysterious crashes: [gw0] linux -- Python 3.9.22 /opt/hostedtoolcache/Python/3.9.22/x64/bin/python
worker 'gw0' crashed while running 'tests/plotting/jupyter/test_trame.py::test_trame_plotter_ui[vue2]' https://github.com/pyvista/pyvista/actions/runs/15746300270/job/44383463660?pr=7624#step:15:3807 [gw0] linux -- Python 3.9.22 /opt/hostedtoolcache/Python/3.9.22/x64/bin/python
worker 'gw0' crashed while running 'tests/plotting/test_plotting.py::test_plot_depth_peeling' Not sure if these are flaky or what the cause is. |
These are flaky, tests pass after restarting. Will try |
Plotting tests seem to be working now without issue... will enable core tests and add xdist groups |
To use |
Overview
pytest-xdist
is included in the test dependencies, but it's not currently used. This PR enables its use.