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

--dup-fixtures always returns 0 exit code

Open sobolevn opened this issue 6 years ago • 1 comments

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:

  1. Current behavior is not mentioned in the docs, which is confusing
  2. I think that it is possible to fail the build. This way you can collect feedback early

sobolevn avatar Apr 28 '18 06:04 sobolevn

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.

jllorencetti avatar Apr 28 '18 13:04 jllorencetti