From 4078c15c718b3668245ecdb7899f8f4e0c501fb2 Mon Sep 17 00:00:00 2001 From: Ilya Etingof Date: Sun, 8 Mar 2020 19:20:18 +0100 Subject: Add tox.ini with some basic runners --- .bandit.yml | 3 +++ tox.ini | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 .bandit.yml create mode 100644 tox.ini diff --git a/.bandit.yml b/.bandit.yml new file mode 100644 index 0000000..a0e3247 --- /dev/null +++ b/.bandit.yml @@ -0,0 +1,3 @@ +skips: +- B603 # Ignore warnings about calling subprocess.Popen without shell=True +- B607 # Ignore warnings about calling subprocess.Popen without a full path to executable diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..52d8772 --- /dev/null +++ b/tox.ini @@ -0,0 +1,47 @@ +[tox] +minversion = 3.5.0 +envlist = unittest, docs, bandit, build + +[testenv] +basepython = python3 +usedevelop = True +setenv = + VIRTUAL_ENV={envdir} + PYTHONWARNINGS=default::DeprecationWarning +install_command = pip install {opts} {packages} + +[testenv:unittest] +deps = + discover + -r{toxinidir}/devel-requirements.txt + -r{toxinidir}/requirements.txt +commands = discover -s tests + +[testenv:cover] +setenv = + {[testenv]setenv} + PYTHON=coverage run --parallel-mode +deps = + coverage + discover +commands = coverage erase + coverage run --source pyasn1 -m unittest discover {posargs} + coverage report --fail-under 80 + +[testenv:bandit] +skip_install = true +deps = + bandit +commands = + bandit -r pyasn1 -c .bandit.yml + +[testenv:docs] +commands = make -C docs html + +[testenv:build] +skip_install = true +deps = + wheel + setuptools +commands = + python setup.py -q sdist bdist_wheel -- cgit v1.2.1