# Tox (http://tox.testrun.org/) is a tool for running tests # in multiple virtualenvs. This configuration file will run the # test suite on all supported python versions. To use it, "pip install tox" # and then run "tox" from this directory. # To run an individual test environment run e.g. tox -e py38 [tox] isolated_build = true envlist = lint,py{37,38,39,310,311} skipsdist=True [testenv] deps = -rrequirements-tox.txt commands = # Run unittests with coverage coverage run tests/runtests.py coverage report -m --fail-under 99 [testenv:lint] # NOTE: As opposed to above pyXY environments, which run in pythonX.Y, this # environment uses the `python` available on the path. commands = black --check --diff . isort --check --diff . # Run pylint, using the Secure System Lab's pylintrc as base config # https://github.com/secure-systems-lab/sample-documents/blob/master/pylintrc pylint in_toto # Run pylint on tests with required exemptions to allow protected member # access (W0212) and test methods that don't use self (R0201). Also be less # strict about naming (C0103, C0202), docs (C0111) and line length (C0301). pylint tests --disable W0212,R0201,C0103,C0202,C0111,C0301,W0719 # Run bandit, a security linter from OpenStack Security # Exclude files that need special treatment and are tested below bandit -r in_toto