Massive unit test vs MySQL

Neil Padgen neil.padgen at mon.bbc.co.uk
Fri Sep 12 05:55:07 EDT 2003


>>>>> "Richard" == Richard Wesley <hawkfish at trustedmedianetworks.com> 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