python-tuf/tox.ini
Lukas Puehringer e8420483e2 Install TUF in editable mode in tox builds
This commit partially reverts the workaround introduced by
157167e0cc. Instead of patching the
path, we configure tox to install TUF in editable mode, which makes
the tests run against the same files as if the path were patched.
This makes it so that coverage records paths that it can then
normalize when sending them to coveralls.io (see .travis.yml).

See af22701140
for detailed background information.

As a consequence we can now skip building of sdist and installing it
into a virtual env directory in tox.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2019-07-11 14:32:49 +02:00

28 lines
1,005 B
INI

# Tox (https://tox.readthedocs.io/en/latest/) 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.
[tox]
envlist = py27, py34, py35, py36
skipsdist = true
[testenv]
# 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 =
pylint {toxinidir}/tuf
bandit -r {toxinidir}/tuf
coverage run aggregate_tests.py
coverage report -m --fail-under 97
deps =
-r{toxinidir}/ci-requirements.txt
# 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 = pip install --pre {opts} {packages}