From 95fb6e5f8988079d7dffe3a039f1ebd697199eb8 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Mon, 18 Jun 2012 18:30:21 -0700 Subject: [PATCH] Funnel debug logging through nose properly. Change-Id: Ic76289c702ed54c9bf7b9fa4cb140d62049dfb9e --- glance/tests/__init__.py | 6 ++++-- tox.ini | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/glance/tests/__init__.py b/glance/tests/__init__.py index 9422f7b8..337800f4 100644 --- a/glance/tests/__init__.py +++ b/glance/tests/__init__.py @@ -20,10 +20,12 @@ import __builtin__ setattr(__builtin__, '_', lambda x: x) -# Set up logging to output debugging import logging +import sys + +# Set up logging to output debugging logger = logging.getLogger() -hdlr = logging.FileHandler('run_tests.log', 'w') +hdlr = logging.StreamHandler(sys.stdout) formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s') hdlr.setFormatter(formatter) logger.addHandler(hdlr) diff --git a/tox.ini b/tox.ini index 1b0768da..b9b74180 100644 --- a/tox.ini +++ b/tox.ini @@ -8,7 +8,6 @@ setenv = VIRTUAL_ENV={envdir} NOSE_OPENSTACK_RED=0.05 NOSE_OPENSTACK_YELLOW=0.025 NOSE_OPENSTACK_SHOW_ELAPSED=1 - NOSE_OPENSTACK_STDOUT=1 deps = -r{toxinidir}/tools/pip-requires -r{toxinidir}/tools/test-requires commands = nosetests {posargs}