Massive unit test vs MySQL

Neil Padgen neil.padgen at
Fri Sep 12 11:55:07 CEST 2003

>>>>> "Richard" == Richard Wesley <hawkfish at> writes:

    Richard> OK, I'm an idiot.  It had nothing to do with the reload
    Richard> script.  The connections were from the TestCase subclass
    Richard> I have that instantiates a connection management object.
    Richard> It appears that the unittest module does not dispose of
    Richard> the objects it instantiates until the end of the run, so
    Richard> you need to REALLY clean up in the tearDown method.  I
    Richard> discovered this by making a persistent connection for the
    Richard> reload operation and noticing that the number of
    Richard> connections still increased.

Doh!  I should have thought of this, as I've had exactly the same
problem in the past.

Thanks for posting your solution.

-- Neil

More information about the Python-list mailing list