pytest

Introduction

Python test runner

http://pytest.org/

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.

shell console
$ pytest --pep8 -m pep8

pylint only

Run only the pylint linting.

shell console
$ pytest --pylint -m pylint

Both pep8 and pylint

Run both linting tools but not the tests themselves.

shell console
$ pytest --pep8 --pylint -m 'pep8 or pylint'

Run all the tests including the linting tools.

shell console
$ pytest