Benjamin Peterson, 06.10.2013 17:41:
> 2013/10/6 Victor Stinner:
>> unittest doesn't look to release memory (the TestCase class) after the
>> execution of a test.
> 
> Is it important to optimize unittests for memory usage?

Maybe "optimise" isn't the best word, but test suites can sometimes be huge
and I can't see a reason to keep an old TestClass instance around after all
its tests have run. So why not free it? If the tests do any intermediate
caching, it's likely to happen at that level (or at the module level, but
that's the user's decision).

Sure, if memory matters, there's tearDownClass() for manual cleanup, but
why require users to care when we otherwise provide automatic memory
management everywhere else? It certainly improves the default setup.

Stefan


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to