Ben Finney wrote:
Salim Fadhley <[EMAIL PROTECTED]> writes:

The unit-test needs to check that after the functions have been run
a few thousand times all of the memory used by those functions has
been un-allocated, i.e. that there are no memory leaks.

This is a great test case, .... However, I wonder why you specify
the need to run the function *thousands* of times to test whether
it releases memory. Surely your code unit is deterministic and will
release memory (or not) the same way with the same inputs each time?

Because simply using small integers will cause them to exist and live
on in a cache.  For this (and similar caching reasons), what you want
to see is that memory doesn't grow in an unbounded way.


--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to