mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Follows up on #978, which had the following problems: - too many requirements files (cc @trishankatdatadog ;) - used extra tooling around pip-compile that - didn't take into account requirement markers (see comments in requirements.txt in this commit), and - confused Dependabot, which expects the hashed requirements file in a certain format, as pip-compile would generate it without custom tooling (see #979). This commit restructures the requirements files as follows: - Merges requirements-tox.txt and requirements-test.txt. The separation was semantically correct but operationally irrelevant. - Removes the hashed requirements file, which doesn't add much security, especially with PEP 458 on the way (see python/peps#1306), but extra maintenance (see notes about requirements.txt in #978 and about Dependabot above) - Manually adds environment markers to requirements-pinned.txt (see comments in requirements.txt in this commit). Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
41 lines
1.4 KiB
INI
41 lines
1.4 KiB
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, py35, py36, py37, py38
|
|
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}/requirements-test.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}
|
|
|
|
|
|
# Develop test env to run tests against securesystemslib's master branch
|
|
# Must to be invoked explicitly with, e.g. `tox -e with-sslib-master`
|
|
[testenv:with-sslib-master]
|
|
deps =
|
|
--editable git+http://github.com/secure-systems-lab/securesystemslib.git@master#egg=securesystemslib[crypto,pynacl]
|
|
-r{toxinidir}/requirements-test.txt
|
|
--editable {toxinidir}
|
|
|
|
commands =
|
|
coverage run aggregate_tests.py
|
|
coverage report -m
|