mirror of
https://github.com/beetbox/beets.git
synced 2026-01-10 01:50:34 +01:00
Merge pull request #625 from geigerzaehler/nose-capture-log
Use nose to capture logs during test
This commit is contained in:
commit
7cffaf4bb3
2 changed files with 8 additions and 4 deletions
3
setup.cfg
Normal file
3
setup.cfg
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[nosetests]
|
||||
verbosity=1
|
||||
logging-clear-handlers=1
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue