From 3e217d2eae88c638285303e39a3ae9d6ae450237 Mon Sep 17 00:00:00 2001 From: Philip Schwartz Date: Thu, 31 Jul 2014 11:05:09 -0400 Subject: [PATCH] RM8039 Add base test infrastructure Signed-off-by: Philip Schwartz --- .gitignore | 2 ++ test-requirements.txt | 1 + tox.ini | 27 +++++++++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore index 4e87b7d..3af9396 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /.DS_Store /.coverage +/.tox /.venv /build /cov_html @@ -8,3 +9,4 @@ *.log *.pyc *.swp +*.whl diff --git a/test-requirements.txt b/test-requirements.txt index c8afbf4..5236943 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,3 +2,4 @@ coverage mock nose pep8 +tox diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..7c25551 --- /dev/null +++ b/tox.ini @@ -0,0 +1,27 @@ +[tox] +envlist = py26,py27,py33,py34,pep8 + +[testenv] +setenv = LANG=en_US.UTF-8 + LANGUAGE=en_US:en + LC_ALL=C + +deps = -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt +commands = nosetests -v {posargs} + +[testenv:pep8] +deps = pep8 +commands = pep8 --repeat --show-source striker tests + +[testenv:cover] +deps = -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt +commands = nosetests -v --with-coverage --cover-package=striker \ + --cover-branches --cover-html --cover-html-dir=cov_html \ + {posargs} + +[testenv:shell] +deps = -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt +commands = {posargs}