pytest-split
pytest-split copied to clipboard
compatibility with pytest-dependency
Hi,
first: thank you for the cool tool, it really helps with faster CI pipelines :)
My request: can you make the split algorithm take pytest dependencys into account? We have same test that depend on other test to run first. Currently pytest splits theses into different groups which will result in the tests failing.
Hi! Interesting use case 🤔 How do you ensure they run in correct order without using pytest-split? Are the tests which depend on each other within the same module or even within the same class?
If you could move the dependencies into fixtures, that would probably solve the issue without needing to change how pytest-split behaves. If that's out of question, I guess one option could be to introduce some CLI options to pytest-split for not splitting test modules / classes.
Sorry, I think I misread initially. So, you are basically asking if pytest-split could be made compatible with https://pypi.org/project/pytest-dependency/?
Yes, was just about to post that we use pytest-dependency But I didn't know that pytest-split is compatible with fixtures already. Maybe it would be worth it to refactor our tests into fixtures then as pytest-dependency seems to be out of date anyways.
Maybe it would be worth it to refactor our tests into fixtures
Great! I hope it works out nicely for you 🙂