kevlened / pytest-parallel

A pytest plugin for parallel and concurrent testing
https://github.com/browsertron/pytest-parallel/issues/104#issuecomment-1293941066
MIT License
313 stars 59 forks source link

If tests call code that `fork()`s, use of this plugin often leads to crashes on Mac OS High Sierra and onward, *even when number of workers is set to 1* #109

Open posita opened 2 years ago

posita commented 2 years ago

Background: https://stackoverflow.com/q/50168647

I think this should at least be prominently documented. I can conceive of a couple work-arounds.

  1. Programmatically set the OBJC_DISABLE_INITIALIZE_FORK_SAFETY environment variable to YES before running tests.
  2. Create a marker and allow for a mechanism to avoid running marked tests outside the main process? (Not sure if this would work, or how feasible this is.)

But again, I think this symptom and the basic work-around outlined in the StackOverflow post should make its way into the documentation somewhere visible (maybe even with a link to that post).