Switch to flake8 and testr
Change-Id: Ia25ef86786895f376be410f74b9a30e3e8ff4243
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -20,3 +20,4 @@ doc/source/api/*
|
|||||||
doc/build/*
|
doc/build/*
|
||||||
dist
|
dist
|
||||||
monikerclient/versioninfo
|
monikerclient/versioninfo
|
||||||
|
.testrepository
|
||||||
|
4
.testr.conf
Normal file
4
.testr.conf
Normal file
@@ -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
|
@@ -1,4 +1,7 @@
|
|||||||
|
flake8
|
||||||
nose
|
nose
|
||||||
mox
|
mox
|
||||||
openstack.nose_plugin
|
openstack.nose_plugin
|
||||||
|
python-subunit
|
||||||
sphinx
|
sphinx
|
||||||
|
testrepository
|
||||||
|
50
tox.ini
50
tox.ini
@@ -1,39 +1,33 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = py26,py27,pep8,pyflakes
|
envlist = py26,py27,pep8
|
||||||
minversion = 1.4.0
|
minversion = 1.4.0
|
||||||
|
|
||||||
|
[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
|
||||||
|
commands =
|
||||||
|
python setup.py testr --testr-args='{posargs}'
|
||||||
|
sitepackages = False
|
||||||
|
|
||||||
|
|
||||||
[tox:jenkins]
|
[tox:jenkins]
|
||||||
downloadcache = ~/cache/pip
|
downloadcache = ~/cache/pip
|
||||||
|
|
||||||
[testenv]
|
[testenv:pep8]
|
||||||
deps = -r{toxinidir}/tools/setup-requires
|
commands = flake8
|
||||||
-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}
|
|
||||||
sitepackages = False
|
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
deps = {[testenv]deps}
|
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
||||||
coverage
|
|
||||||
nosexcover
|
|
||||||
setenv = {[testenv]setenv}
|
|
||||||
NOSE_WITH_COVERAGE=1
|
|
||||||
|
|
||||||
[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
|
|
||||||
|
|
||||||
[testenv:pyflakes]
|
|
||||||
deps = {[testenv]deps}
|
|
||||||
pyflakes==0.5.0
|
|
||||||
commands = pyflakes monikerclient bin setup.py
|
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
commands = {posargs}
|
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
|
||||||
|
Reference in New Issue
Block a user