From 1be80b950668e52356015b0b97dfa342e298f48d Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Mar 15 2017 21:14:12 +0000 Subject: Add a tox.ini to test against all versions of Python Signed-off-by: Jeremy Cline --- diff --git a/README.md b/README.md index e6c1501..c3a4535 100644 --- a/README.md +++ b/README.md @@ -35,3 +35,8 @@ values in `waiverdb/config.py`. You can run this test suite with the following command:: $ py.test tests/ + +To test against all supported versions of Python, you can use tox:: + + $ sudo dnf install python3-tox + $ tox diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..93c0243 --- /dev/null +++ b/tox.ini @@ -0,0 +1,24 @@ +[tox] +envlist = lint,py27,py34,py35,py36 +# If the user is missing an interpreter, don't fail +skip_missing_interpreters = True + +[testenv] +deps = + -rrequirements.txt +whitelist_externals = + find +commands = + find -name *.pyc -delete + py.test tests/ + +[testenv:lint] +deps = + flake8 > 3.0 +commands = + python -m flake8 {posargs} + +[flake8] +show-source = True +max-line-length = 100 +exclude = .git,.tox,dist,*egg