Testing
See also:
Environment and requirements
Tox is used to manage test virtualenvs, and is the only tool needed to run static analysis and unitary tests, as it will create the appropriate testing virtualenvs on-the-fly.
(shaarli) $ pip install -r requirements/ci.txt
Nevertheless, in case you want to install test, development and documentation dependencies, e.g. for editor integration or local debugging:
(shaarli) $ pip install -r requirements/dev.txt
Tools
The documentation is written in reStructuredText, using the Sphinx generator.
Coding style is checked using tools provided by the Python Code Quality Authority:
isort: check import ordering and formatting
pycodestyle: Python syntax and coding style (see PEP8)
pydocstyle: docstring formatting (see PEP257)
pylint: syntax checking using predefined heuristics
Tests are run using the pytest test framework/harness, with the following plugins:
pytest-pylint: pylint integration
pytest-cov: coverage integration
Running the tests
To renew test virtualenvs, run all tests and generate the documentation:
$ tox -r
To run specific tests without renewing the corresponding virtualenvs:
$ tox -e py34 -e py36
To run specific tests and renew the corresponding virtualenv:
$ tox -r py35