From 7d82ad6734d9501677dfe4df160865e4e422e84f Mon Sep 17 00:00:00 2001 From: Qulu Date: Sat, 12 Jan 2019 04:51:19 +0400 Subject: [PATCH] Add tox.ini configuration file for tox testing tool Run multi-python tests with pytest and also static analysis tests with flake8. --- tox.ini | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tox.ini diff --git a/tox.ini b/tox.ini new file mode 100644 index 000000000..8e5ddd2c3 --- /dev/null +++ b/tox.ini @@ -0,0 +1,39 @@ +# Tox (https://tox.readthedocs.io) 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, py37, flake8-27, flake8-37 +minversion = 2.5.0 +skip_missing_interpreters = true +requires = tox-venv + +[testenv] +deps = + -rrequirements.txt + pytest +commands = + python -m pytest {posargs} +extras = test + +[testenv:flake8-27] +basepython = python2.7 +deps = flake8 +commands = + flake8 . --count --select=E722,F401,F811,E901, \ + E999,F821,F822,F823 --show-source --statistics + - flake8 . --count --max-complexity=10 \ + --max-line-length=79 --statistics +skip_install = True + +[testenv:flake8-37] +basepython = python3.7 +deps = flake8 +commands = + flake8 . --count --select=E722,F401,F811,E901, \ + E999,F821,F822,F823 --show-source --statistics + - flake8 . --count --max-complexity=10 \ + --max-line-length=79 --statistics +skip_install = True +