-
Notifications
You must be signed in to change notification settings - Fork 6
/
tox.ini
34 lines (28 loc) · 1.06 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# 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]
skipsdist = True
envlist = py39
[testenv]
deps =
-r requirements.txt
pylint
bandit
coverage
mock
setenv = PYTHONPATH={envsitepackagesdir}
commands =
# Run pylint, using secure system lab's pylintrc configuration file
# https://github.com/secure-systems-lab/sample-documents/blob/master/pylintrc
pylint intoto.py
# Run bandit, a security linter from OpenStack Security
# We need to import subprocess to run the apt http transport
# https://docs.openstack.org/bandit/latest/blacklists/blacklist_imports.html#b404-import-subprocess
bandit intoto.py --skip B404
# Run tests generating coverage
{envpython} -m coverage run -m unittest discover
{envpython} -m coverage combine
{envpython} -m coverage report -m