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 .coverage
subunit.log
.venv .venv
*,cover *,cover
cover cover
@ -12,6 +13,7 @@ dist
python_glanceclient.egg-info python_glanceclient.egg-info
ChangeLog ChangeLog
run_tests.err.log run_tests.err.log
.testrepository
.tox .tox
doc/source/api doc/source/api
*.egg *.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] [build_sphinx]
source-dir = doc/source source-dir = doc/source
build-dir = doc/build build-dir = doc/build

View File

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

View File

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

23
tox.ini
View File

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