Merge "Allow pdb debugging in manually-invoked tests."

This commit is contained in:
Jenkins 2013-04-10 06:28:53 +00:00 committed by Gerrit Code Review
commit 8ad5612317
2 changed files with 3 additions and 3 deletions

View File

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

View File

@ -50,10 +50,10 @@ class BaseTestCase(testtools.TestCase):
self.addCleanup(CONF.reset)
if os.environ.get('OS_STDOUT_NOCAPTURE') not in TRUE_STRING:
if os.environ.get('OS_STDOUT_CAPTURE') in TRUE_STRING:
stdout = self.useFixture(fixtures.StringStream('stdout')).stream
self.useFixture(fixtures.MonkeyPatch('sys.stdout', stdout))
if os.environ.get('OS_STDERR_NOCAPTURE') not in TRUE_STRING:
if os.environ.get('OS_STDERR_CAPTURE') in TRUE_STRING:
stderr = self.useFixture(fixtures.StringStream('stderr')).stream
self.useFixture(fixtures.MonkeyPatch('sys.stderr', stderr))
self.stubs = stubout.StubOutForTesting()