Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try out the flake8-pytest linter #16

Open
abadger opened this issue May 11, 2020 · 1 comment
Open

Try out the flake8-pytest linter #16

abadger opened this issue May 11, 2020 · 1 comment

Comments

@abadger
Copy link
Contributor

abadger commented May 11, 2020

@webknjaz suggested we try out the following linter for giving our tests a consistent style:

m-burst/flake8-pytest-style#23

I know how tests tend to get very ad hoc and inscrutable as they grow over time so it would be good to try that out and see if it fits with how we want to write tests and is helpful for making tests which are more readable later.

@webknjaz
Copy link
Member

FTR here's how I configure it (because I prefer things to be slightly different from defaults):

# flake8-pytest-style
# PT001:
pytest-fixture-no-parentheses = true
# PT006:
pytest-parametrize-names-type = tuple
# PT007:
pytest-parametrize-values-type = tuple
pytest-parametrize-values-row-type = tuple

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants