[py-dev] 1.0.0b8 out

holger krekel holger at merlinux.eu
Thu Jul 23 19:52:55 CEST 2009


On Thu, Jul 23, 2009 at 12:04 +1000, Gordon Wrigley wrote:
> Alas I'm still getting logging issues, specifically I get a big slab
> of this every time a test fails
> 
> Traceback (most recent call last):
>   File "/usr/lib/python2.6/logging/__init__.py", line 769, in emit
>     stream.write(fs % msg)
> ValueError: I/O operation on closed file

hum, py.test does not do anything with logging itself. 
But it captures stdout/stderr during setup, test-call
and teardown to temporary files/StringIOs.  It properly 
closes the temporary files/streams at each of the
three phases.  Do you have a single logging configuration
during setup/call/teardown, mabe? 

if you disable output capturing with "-s" you don't 
see these error message, right? 

holger



More information about the Pytest-dev mailing list