Open nathanjmcdougall opened 1 month ago
Hmmm...it doesn't seem like there are many places where were are currently using complex parameterization in pytest, are you able to point to the benefits for pins
(or maybe it is just to make sure it stays in compliance)?
Yeah I should probably have been more specific. Many PT
rules are nothing to do with parameterization.
The two I see special value in for pins-python
are:
https://docs.astral.sh/ruff/rules/pytest-raises-too-broad/
https://docs.astral.sh/ruff/rules/pytest-raises-with-multiple-statements/
Since they force you to be a bit more rigorous in your testing.
Most of the others just keep consistency throughout a project in terms of formatting.
As you can probably tell by now, my approach with ruff is quite aggressive, anything that creates consistency makes me happy, especially when the rules have an autofix available. But that approach is not for everyone, I defer to your choice 🙇
https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
There are many ways to do the same thing in
pytest
, and I have found these rules to be helpful for consistency across a codebase.There are a few that are arguably too opinionated, in particular
PT003
,PT004
, andPT013
.PT006
can be configured with:for consistency with the existing codebase.