pytest¶
Introduction¶
Python test runner
pycodestyle and pylint¶
Use the plugins pytest-pep8 and pytest-pylint.
With these plugins the linting operations are completely integrated within the test workflow. The results of the tests and linting operations are rendered in a consistent format.
pep8 only¶
Run only the pep8
linting.
$ pytest --pep8 -m pep8
pylint only¶
Run only the pylint
linting.
$ pytest --pylint -m pylint
Both pep8 and pylint¶
Run both linting tools but not the tests themselves.
$ pytest --pep8 --pylint -m 'pep8 or pylint'
Run all the tests including the linting tools.
$ pytest