I could instead add a more explicit --nothreading option, if you prefer, but this patch makes pytest-parallel a drop-in replacement for pytest-xdist (if you added -n as an alias for --workers), which is what we're using it as.
Even better would be to have the first "thread" of each process run in the main thread, and send anything marked with pytest.mark.threadunsafe to only main-thread workers. But that's a ton more work.
I could instead add a more explicit --nothreading option, if you prefer, but this patch makes pytest-parallel a drop-in replacement for pytest-xdist (if you added -n as an alias for --workers), which is what we're using it as.
Even better would be to have the first "thread" of each process run in the main thread, and send anything marked with pytest.mark.threadunsafe to only main-thread workers. But that's a ton more work.