pytest-split icon indicating copy to clipboard operation
pytest-split copied to clipboard

Interaction with pytest fixtures

Open f0uriest opened this issue 2 years ago • 1 comments

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?

f0uriest avatar Sep 23 '22 23:09 f0uriest

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 🙂

jerry-git avatar Apr 12 '23 06:04 jerry-git