nose-devs/nose — Issue #295: nosetests causes atexit error when using logging.fileConfig
Author: jpellerin
Created: 2011-12-14 16:06:45+00:00
State: open

What steps will reproduce the problem?

From Kevin Dangoor on the list:

It turns out to be pretty easy to boil down. Put this in a
test_logging.py file that nosetests will run:

import logging
from logging import config

config.fileConfig('pylog.ini')
log = logging.getLogger("test")

def test_do_nothing():
log.info("Hi!")

and here's my pylog.ini:

[loggers]
keys=root

[handlers]
keys=myhandler

[formatters]
keys=myformatter

[logger_root]
level=DEBUG
handlers=myhandler

[handler_myhandler]
class=handlers.StreamHandler
level=DEBUG
formatter=myformatter

[formatter_myformatter]
format=%(asctime)s %(levelname)-8s %(name)-12s %(message)s
datefmt=%a, %d %b %Y %H:%M:%S

What is the expected output? What do you see instead?

There should be no error in this case.

Please use labels and text to provide additional information.

Google Code Info:
Issue #: 43
Author: jpelle...@gmail.com
Created On: 2007-03-20T18:05:14.000Z
Closed On: 2007-09-09T12:11:49.000Z