[Python-Dev] unittest.TestSuite holding references to unittest.TestCase instances too long
Antoine Pitrou
solipsis at pitrou.net
Fri Aug 2 18:19:33 CEST 2013
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?
Regards
Antoine.
More information about the Python-Dev
mailing list