Use testr to run nova unittests.

Convert nova from using nosetests to testr for its test runner. Some
tests had to be modified to get them to run properly under testr.

run_tests.sh has been updated to run testr instead of nosetests.

Coverage is collected by running subunit.run under coverage.py when the
coverage environment is selected.

Note that you will need to rebuild your virtualenvs as nose is being
removed from the dependency lists and is being replaced by testr. Tests
will run in different processes once this test is merged so you cannot
use test classes to pass information between tests. Each test should be
a proper independent unit. Additionally the -x and -d flags to
run_tests.sh have been removed as there are currently no decent
approximations for those functions.

Change-Id: I019ca098972ca749b195f59968cf21edd5ba9109
This commit is contained in:
Clark Boylan
2012-10-30 16:30:02 -07:00
parent 249dd8df0a
commit 03b427f8cf
2 changed files with 7 additions and 10 deletions

View File

@@ -196,9 +196,6 @@ def install_dependencies(venv=VENV):
pip_install('-r', PIP_REQUIRES)
pip_install('-r', TEST_REQUIRES)
# Install nova into the virtual_env. No more path munging!
run_command([os.path.join(venv, 'bin/python'), 'setup.py', 'develop'])
def post_process():
get_distro().post_process()

View File

@@ -2,14 +2,14 @@
distribute>=0.6.24
coverage
fixtures
discover
feedparser
fixtures>=0.3.10
mox==0.5.3
nose
testtools
openstack.nose_plugin>=0.7
nosehtmloutput
MySQL-python
pep8==1.3.3
pylint==0.25.2
python-subunit
sphinx>=1.1.2
feedparser
MySQL-python
testrepository>=0.0.8
testtools>=0.9.22