[Python-Dev] unittest.TestSuite holding references to unittest.TestCase instances too long (original) (raw)

Michael Foord fuzzyman at voidspace.org.uk
Fri Aug 2 18:47:04 CEST 2013


Sent from my iPhone

On 2 Aug 2013, at 19:19, Antoine Pitrou <solipsis at pitrou.net> wrote:

Le Fri, 2 Aug 2013 18:13:13 +0300, Michael Foord <fuzzyman at voidspace.org.uk> a écrit :

On 2 Aug 2013, at 14:51, Matt McClure <matthewlmcclure at gmail.com> wrote:

It seems unittest.TestSuite holds references to unittest.TestCase instances after the test runs, until the test suite finishes. In a large suite, where the TestCase instances consume memory during execution, that can lead to exhausting all available memory and the OS killing the test process. Well individual tests not releasing resources could be seen as a bug in those tests. That aside, there's an open bug for this with some discussion and a proposed fix: http://bugs.python.org/issue11798 The agreed on approach just needs doing. The patch is basically ready for commit, except for a possible doc addition, no?

Looks to be the case, reading the patch it looks fine. I'm currently on holiday until Monday. If anyone is motivated to do the docs too and commit that would be great. Otherwise I'll get to it on my return.

Michael

Regards Antoine.


Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk



More information about the Python-Dev mailing list