pytest-deadfixtures
pytest-deadfixtures copied to clipboard
--dup-fixtures always returns 0 exit code
As we have discussed in https://github.com/jllorencetti/pytest-deadfixtures/issues/16#issuecomment-385133269 --dup-fixtures
right now does not raise exceptions even when there are duplicates.
I can think of several things:
- Current behavior is not mentioned in the docs, which is confusing
- I think that it is possible to fail the build. This way you can collect feedback early
Rethinking this after a good night of sleep, makes sense to return non-zero exit code in case of duplicated fixtures too. Also, it would be good to mention the non-zero return for both commands and give a hint about the use case for this, using it in a CI build step, pre-commit, etc.