A flake8 plugin checking common style issues or inconsistencies with pytest-based tests.
Maintained. Last release 13 months ago, commits in 13 of the last 26 weeks. Weaker on recent releases and release cadence.
pip install flake8-pytest-styleflake8-pytest-style
Description
A flake8 plugin checking common style issues or inconsistencies with pytest-based tests.
Currently the following errors are reported:
| Code | Description |
|---|---|
| PT001 | use @pytest.fixture over @pytest.fixture() (configurable by pytest-fixture-no-parentheses) |
| PT002 | configuration for fixture '{name}' specified via positional args, use kwargs |
| PT003 | scope='function' is implied in @pytest.fixture() |
| PT004 | fixture '{name}' does not return anything, add leading underscore |