Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
# Tox ( 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.
envlist = lint,docs,py
skipsdist = true
# TODO: Consider refactoring the tests to not require the aggregation script
# being invoked from the `tests` directory. This seems to be the convention and
# would make use of other testing tools such as coverage/coveralls easier.
changedir = tests
commands =
python3 --version
python3 -m coverage run
python3 -m coverage report -m --fail-under 97
deps =
# Install TUF in editable mode, instead of tox default virtual environment
# installation (see `skipsdist`), to get relative paths in coverage reports
--editable {toxinidir}
install_command = python3 -m pip install {opts} {packages}
# Develop test env to run tests against securesystemslib's master branch
# Must to be invoked explicitly with, e.g. `tox -e with-sslib-master`
commands_pre =
python3 -m pip install git+[crypto,pynacl]
commands =
python3 -m coverage run
python3 -m coverage report -m
changedir = {toxinidir}
lint_dirs = tuf/api tuf/ngclient examples tests
commands =
# Use different configs for new (tuf/api/*) and legacy code
black --check --diff {[testenv:lint]lint_dirs}
isort --check --diff {[testenv:lint]lint_dirs}
pylint -j 0 --rcfile=pyproject.toml {[testenv:lint]lint_dirs}
# NOTE: Contrary to what the pylint docs suggest, ignoring full paths does
# work, unfortunately each subdirectory has to be ignored explicitly.
pylint -j 0 tuf --ignore=tuf/api,tuf/api/serialization,tuf/ngclient,tuf/ngclient/_internal
mypy {[testenv:lint]lint_dirs} tuf/
bandit -r tuf
deps =
changedir = {toxinidir}
commands =
sphinx-build -b html docs docs/build/html -W