The --forked option add a lot of time overhead. In our project structure (monorepo) we are running into global state conflicts between conftest.py of different packages and other global state issues between these packages but testing every package isolated from each other is not an issue.
It would be nice if one could define a path with regex and pytest-forked would then only fork per found subpath.
For example
compontents/* Fork per folder in components
**/tests Fork per tests folder
This way we could get the usual speed but isolate package tests from each other in subprocesses.
The
--forkedoption add a lot of time overhead. In our project structure (monorepo) we are running into global state conflicts betweenconftest.pyof different packages and other global state issues between these packages but testing every package isolated from each other is not an issue.It would be nice if one could define a path with regex and pytest-forked would then only fork per found subpath.
For example
compontents/*Fork per folder in components**/testsFork pertestsfolderThis way we could get the usual speed but isolate package tests from each other in subprocesses.