[TIP] nose and the Python logging module

Brad Allen bradallen137 at gmail.com
Thu Aug 28 12:54:16 PDT 2008

Titus Brown's introductory article about nose, last edited in 2006, 
mentions a caveat about using nose to test apps that use the Python 
logging module:


"The logging module problem cropped up when converting an existing unit 
test suite over to nose: the code tested an application that used the 
logging module, and reconfigured logging so that nose's output didn't 
show up. This frustrated my attempts to trace test discovery to no end 
-- as far as I could tell, nose was simply stopping test discovery at a 
certain point! I doubt there's a general solution to this, but I thought 
I'd mention it."

Is this still an issue? I am thinking about trying out nose, but I don't 
want to waste any time if I'm going to run into the same problem that 
tripped up Titus. The app I want to write tests for makes heavy use of 
the Python logging module.


More information about the testing-in-python mailing list