Allow running individual tests via tox

Allow passing a test module name via the tox command line to allow
running individual tests.

Change-Id: Iff551d054e2a8252f437f6756760cd4418abcfa4
This commit is contained in:
Jamie Lennox 2015-02-10 16:30:52 +11:00
parent a764dafb58
commit 517ea8eccb
2 changed files with 4 additions and 4 deletions

View File

@ -509,7 +509,7 @@ class OpenStackAuthTestsV3(OpenStackAuthTestsMixin, test.TestCase):
def setUp(self): def setUp(self):
super(OpenStackAuthTestsV3, self).setUp() super(OpenStackAuthTestsV3, self).setUp()
if self.interface: if getattr(self, 'interface', None):
override = self.settings(OPENSTACK_ENDPOINT_TYPE=self.interface) override = self.settings(OPENSTACK_ENDPOINT_TYPE=self.interface)
override.enable() override.enable()
self.addCleanup(override.disable) self.addCleanup(override.disable)

View File

@ -14,15 +14,15 @@ setenv = VIRTUAL_ENV={envdir}
NOSE_OPENSTACK_SHOW_ELAPSED=1 NOSE_OPENSTACK_SHOW_ELAPSED=1
deps = -r{toxinidir}/requirements.txt deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
commands = python openstack_auth/tests/run_tests.py commands = python openstack_auth/tests/run_tests.py {posargs}
[testenv:py27dj15] [testenv:py27dj15]
commands = pip install django>=1.5,<1.6 commands = pip install django>=1.5,<1.6
python openstack_auth/tests/run_tests.py python openstack_auth/tests/run_tests.py {posargs}
[testenv:py27dj14] [testenv:py27dj14]
commands = pip install django>=1.4,<1.5 commands = pip install django>=1.4,<1.5
python openstack_auth/tests/run_tests.py python openstack_auth/tests/run_tests.py {posargs}
[testenv:pep8] [testenv:pep8]
setenv = DJANGO_SETTINGS_MODULE=openstack_auth.tests.settings setenv = DJANGO_SETTINGS_MODULE=openstack_auth.tests.settings