pytest-split
pytest-split copied to clipboard
Interaction with pytest fixtures
Several tests in in my code use fixtures, and from looking at the durations file generated by pytest-split it seems like the time for creating those fixtures gets assigned to the first test that calls for them. However, when the tests are split, it splits them in such a way that the fixture has to be created multiple times in different jobs. Is it possible to include the fixture creation time into account somehow, or to keep tests that share fixtures together where possible?
That would indeed make the precision better but tbh I'm not sure how feasible it would be. At least it would add quite a bit of complexity to the whole thing.
If there's someone who wants to give this a try, please do 🙂