-
Notifications
You must be signed in to change notification settings - Fork 9
Description
I have an optimization / feature request.
When I'm running pytest-run-parallel in SciPy, I am usually doing two steps.
- A broad run that operates over all tests, to identify failing tests
- Focused runs on specific tests, to identify specific pytest-run-parallel settings which can reproduce the problem.
When I am doing the second step, it's helpful for pytest to run quickly, because I want to experiment with different combinations of taskset, iterations, and parallel-threads to find what can consistently reproduce the problem. I will usually use an option like -k to filter down what is collected.
Here is an example of a sort of test command line I will use:
spin test -s stats -- -k test_cdf_nolan_samples --parallel-threads=2
Unfortunately, the time spent in _is_thread_unsafe seems to scale with the number of collected tests, rather than the number of selected tests. This specific example spends about 68% of its time running thread safety checks.
My optimization request is that pytest-run-parallel skip checking thread safety for tests which are deselected. I am not sure exactly how difficult this is, so I apologize if this is an unreasonable request.