Closed jhagege closed 4 years ago
in general, pytest-forked separates setup/teardown and shared state in processes, so in a sense it makes accidentally shared state dependent tests pseudo-separated by introducing process isolation
so if a test set works with --forked but fails without,, it points to a state dependency somewhere in the fixtures/setup/teardown or general global state of a module
Hi, I have been usign the pytest-forked plugin which is very helpful. I am wondering why sometimes tests failed when they are ran one after the other, but then pass when they are ran in separate processes thanks to your plugin. I have a use case where I'd like to work with regular pytest (without --forked) option, and I am trying to troubleshoot why one test is failing after another when running without --forked.
Thanks for any hints.