aboutsummaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorDmitry Teselkin <dteselkin@mirantis.com>2016-04-15 09:46:50 +0300
committerGuido G√ľnther <agx@sigxcpu.org>2016-05-20 08:40:52 +0200
commit3a93adaac4dc834168a6305aba739a84ff781d80 (patch)
tree770c941862bf2ca903e49ffd51e432886ffe361a /tox.ini
parentc78a67edb94d13dc3f31964aa196d793c0f3c7e5 (diff)
Use tox for testing
tox is a tool to automate creating venv and running tests like py27 unittests and pep8 style checks. This commit adds tox configs needed and some other files for this feature.
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini23
1 files changed, 23 insertions, 0 deletions
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..2f98f90
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,23 @@
+[tox]
+envlist = pep8, py27
+skipsdist = True
+
+[testenv]
+whitelist_externals =
+ find
+install_command = pip install {opts} {packages}
+deps = -r{toxinidir}/requirements.txt
+sitepackages = True
+commands =
+ find . -type f -name "*.pyc" -delete
+
+[testenv:pep8]
+deps = hacking
+commands =
+ find . -type f -name "*.pyc" -delete
+ flake8 {posargs}
+
+[testenv:py27]
+commands =
+ find . -type f -name "*.pyc" -delete
+ python setup.py nosetests --verbosity=3 --with-xcoverage {posargs}