Migrate to testr.

Part of blueprint grizzly-testtools

Change-Id: I9a12f0300e2731a6ee0a82e1f9737a6b83aa5d85
This commit is contained in:
Monty Taylor 2012-12-24 22:50:58 -06:00
parent 1d461a6496
commit c5e9426bb5
6 changed files with 22 additions and 24 deletions

2
.gitignore vendored
View File

@ -1,4 +1,5 @@
.coverage
subunit.log
.venv
*,cover
cover
@ -12,6 +13,7 @@ dist
python_glanceclient.egg-info
ChangeLog
run_tests.err.log
.testrepository
.tox
doc/source/api
*.egg

4
.testr.conf Normal file
View File

@ -0,0 +1,4 @@
[DEFAULT]
test_command=${PYTHON:-python} -m subunit.run discover -t ./ ./tests $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@ -1,11 +1,3 @@
[nosetests]
cover-package = glanceclient
cover-html = true
cover-erase = true
cover-inclusive = true
verbosity=2
detailed-errors=1
[build_sphinx]
source-dir = doc/source
build-dir = doc/build

View File

@ -43,7 +43,6 @@ setuptools.setup(
dependency_links=dependency_links,
tests_require=tests_require,
setup_requires=['setuptools-git>=0.4'],
test_suite="nose.collector",
entry_points={'console_scripts': ['glance = glanceclient.shell:main']},
data_files=[('glanceclient', ['glanceclient/versioninfo'])]
)

View File

@ -1,12 +1,10 @@
distribute>=0.6.24
coverage
discover
mox
nose
nose-exclude
nosexcover
openstack.nose_plugin
nosehtmloutput
pep8==1.3.3
setuptools-git>=0.4
sphinx>=1.1.2
testrepository>=0.0.13
testtools>=0.9.22

23
tox.ini
View File

@ -3,21 +3,24 @@ envlist = py26,py27,pep8
[testenv]
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
NOSE_OPENSTACK_STDOUT=1
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=C
OS_STDOUT_NOCAPTURE=False
OS_STDERR_NOCAPTURE=False
deps = -r{toxinidir}/tools/pip-requires
-r{toxinidir}/tools/test-requires
commands = nosetests {posargs}
commands = python setup.py testr --testr-args='{posargs}'
[testenv:pep8]
commands = pep8 --repeat --show-source --exclude=.venv,.tox,dist,doc,*egg .
[testenv:cover]
commands = nosetests --cover-erase --cover-package=glanceclient --with-xcoverage
[testenv:venv]
commands = {posargs}
[testenv:cover]
commands = python setup.py testr --coverage --testr-args='{posargs}'
[tox:jenkins]
downloadcache = ~/cache/pip