summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEndre Karlson <endre.karlson@gmail.com>2013-05-23 23:23:57 +0200
committerEndre Karlson <endre.karlson@gmail.com>2013-05-24 12:44:02 +0200
commitd038db8a505aa31a1c78072d382ed3b3cda738a0 (patch)
tree1fdabf3bfc046cd5dd2f44ea87a4148169b6135c
parente853efb11d06be74dc7a7bb43bdd2cf7f55e239e (diff)
downloadpython-designateclient-d038db8a505aa31a1c78072d382ed3b3cda738a0.tar.gz
Switch to flake8 and testr
Change-Id: Ia25ef86786895f376be410f74b9a30e3e8ff4243
-rw-r--r--.gitignore1
-rw-r--r--.testr.conf4
-rw-r--r--tools/test-requires3
-rw-r--r--tox.ini42
4 files changed, 26 insertions, 24 deletions
diff --git a/.gitignore b/.gitignore
index 3f8253d..5430ee8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,3 +20,4 @@ doc/source/api/*
doc/build/*
dist
monikerclient/versioninfo
+.testrepository
diff --git a/.testr.conf b/.testr.conf
new file mode 100644
index 0000000..08b650b
--- /dev/null
+++ b/.testr.conf
@@ -0,0 +1,4 @@
+[DEFAULT]
+test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ ./monikerclient/tests $LISTOPT $IDOPTION
+test_id_option=--load-list $IDFILE
+test_list_option=--list
diff --git a/tools/test-requires b/tools/test-requires
index daf9e63..c728a45 100644
--- a/tools/test-requires
+++ b/tools/test-requires
@@ -1,4 +1,7 @@
+flake8
nose
mox
openstack.nose_plugin
+python-subunit
sphinx
+testrepository
diff --git a/tox.ini b/tox.ini
index 66819e1..0b75652 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,39 +1,33 @@
[tox]
-envlist = py26,py27,pep8,pyflakes
+envlist = py26,py27,pep8
minversion = 1.4.0
-[tox:jenkins]
-downloadcache = ~/cache/pip
-
[testenv]
+setenv = VIRTUAL_ENV={envdir}
+ LANG=en_US.UTF-8
+ LANGUAGE=en_US:en
+ LC_ALL=C
deps = -r{toxinidir}/tools/setup-requires
-r{toxinidir}/tools/pip-requires
-r{toxinidir}/tools/test-requires
-setenv = VIRTUAL_ENV={envdir}
- NOSE_WITH_OPENSTACK=1
- NOSE_OPENSTACK_COLOR=1
- NOSE_OPENSTACK_RED=0.05
- NOSE_OPENSTACK_YELLOW=0.025
- NOSE_OPENSTACK_SHOW_ELAPSED=1
-commands = nosetests {posargs}
+commands =
+ python setup.py testr --testr-args='{posargs}'
sitepackages = False
-[testenv:cover]
-deps = {[testenv]deps}
- coverage
- nosexcover
-setenv = {[testenv]setenv}
- NOSE_WITH_COVERAGE=1
+
+[tox:jenkins]
+downloadcache = ~/cache/pip
[testenv:pep8]
-deps = {[testenv]deps}
- pep8==1.3.3
-commands = pep8 --repeat --show-source --exclude=.venv,.tox,dist,doc,openstack monikerclient setup.py bin/moniker
+commands = flake8
-[testenv:pyflakes]
-deps = {[testenv]deps}
- pyflakes==0.5.0
-commands = pyflakes monikerclient bin setup.py
+[testenv:cover]
+commands = python setup.py testr --coverage --testr-args='{posargs}'
[testenv:venv]
commands = {posargs}
+
+[flake8]
+ignore = E12,E711,E721,E712,F,H302
+show-source = True
+exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools