Merge pull request #625 from geigerzaehler/nose-capture-log

Use nose to capture logs during test
This commit is contained in:
geigerzaehler 2014-03-24 17:43:16 +01:00
commit 7cffaf4bb3
2 changed files with 8 additions and 4 deletions

3
setup.cfg Normal file
View file

@ -0,0 +1,3 @@
[nosetests]
verbosity=1
logging-clear-handlers=1

View file

@ -42,6 +42,11 @@ beetsplug.__path__ = [ os.path.abspath(
# Test resources/sandbox path.
RSRC = os.path.join(os.path.dirname(__file__), 'rsrc')
# Propagate to root loger so nosetest can capture it
log = logging.getLogger('beets')
log.propagate = True
log.setLevel(logging.DEBUG)
# Dummy item creation.
_item_ident = 0
def item(lib=None):
@ -114,10 +119,6 @@ class TestCase(unittest.TestCase):
# Initialize, but don't install, a DummyIO.
self.io = DummyIO()
# Suppress logging output.
log = logging.getLogger('beets')
log.setLevel(logging.CRITICAL)
def tearDown(self):
if os.path.isdir(self.temp_dir):
shutil.rmtree(self.temp_dir)