# adapted from glance tox.ini [tox] minversion = 1.6 envlist = py27,py39,pep8,bandit skipsdist = True # tox does not work if the path to the workdir is too long, so move it to /tmp toxworkdir = /tmp/{env:USER}_utilities_ceph_manager_tox [testenv] basepython = python3.9 setenv = VIRTUAL_ENV={envdir} usedevelop = True install_command = pip install -U --force-reinstall \ -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \ {opts} {packages} deps = -r{toxinidir}/test-requirements.txt commands = pytest {posargs} allowlist_externals = bash passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY [testenv:py27] basepython = python2.7 install_command = pip install -U --force-reinstall \ -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \ {opts} {packages} [testenv:pep8] commands = flake8 {posargs} [flake8] exclude = .venv,.git,.tox,dist,doc,etc,*glance/locale*,*lib/python*,*egg,build import-order-style = google application-import-names = ceph_manager,cephclient [bandit] # The following bandit tests are being skipped: # B104: Test for use of assert # B110: Try, Except, Pass detected. # # Note: 'skips' entry cannot be split across multiple lines # skips = B104,B110 exclude = tests [testenv:bandit] basepython = python3.9 deps = -r{toxinidir}/test-requirements.txt commands = bandit --ini tox.ini -n 5 -r ceph_manager