[TIP] Better debugging of ResourceWarnings

Barry Warsaw barry at python.org
Fri Jun 14 12:47:30 PDT 2013


On Jun 14, 2013, at 09:00 PM, Marius Gedminas wrote:

>Sprinkling gc.collect() in all the suspicious tearDown() methods might
>trigger these warnings sooner, and attribute them to the right test.

I've done that and it definitely changes the behavior, but not in a helpful
way.  Mostly the ResourceWarnings go away, but every once in a while
(e.g. maybe every 5th run of the test suite) one will crop up, always in the
tearDown of a different test.  It's crazy! :)

-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20130614/6a2fcb05/attachment.pgp>


More information about the testing-in-python mailing list