Skip to content

Commit

Permalink
Add tox.ini configuration file for tox testing tool
Browse files Browse the repository at this point in the history
Run multi-python tests with pytest and also static analysis tests with flake8.
  • Loading branch information
uluQulu committed Jan 12, 2019
1 parent ed2ea6c commit 7d82ad6
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7d82ad6

Please sign in to comment.