nose-devs / nose

nose is nicer testing for python
http://readthedocs.org/docs/nose/en/latest/
1.36k stars 395 forks source link

LazySuite._precache is never cleared leading to increased memory consumption #1055

Open iainb opened 7 years ago

iainb commented 7 years ago

As the title says, LazySuite._precache is never cleared, this means that all Test instances are kept in memory for the life time of a test run. I work with a test suite that has a large number of tests, some of which create a lot of temporary objects and store them on the test class. This leads to nose running out of memory and prevents us from running the whole test suite.

I have fixed the issue with this PR https://github.com/nose-devs/nose/pull/1054

Though it looks like this project is dead :( It would be great if it could be merged in upstream, I'm sure a lot of people who are running nose 1 will benefit from this change.