Massive unit test vs MySQL

Richard Wesley hawkfish at trustedmedianetworks.com
Fri Sep 5 11:18:41 EDT 2003


In article <bja6rb$h4b$1 at svr8.m-online.net>,
 "Stephan Schaumann" <stephan.delete-schaumann at online.de> wrote:

> "Richard Wesley" <hawkfish at trustedmedianetworks.com> schrieb:
> > I don't know if this is really a Python question of a MySQL question,
> > but i am hopen that there is enough overlap that someone can help me ;-)
> >
> > I have a unit test suite for our server that loads a clean database
> > image for many of the tests.  I use
> >
> > p = os.popen('mysql -u uid -ppassword mydatabase', 'w')
> > p.write(sql_commands)
> 
> Do you p.close() when you are finished? Otherwise the connection opend by
> mysql will stay open.

Yes I did, to no avail.  I tried a number of things (including wait()) 
but nothing seems to clean the threads up but script termination (which 
clens them up almost instantly).  

Could this be a gc issue of some kind?

-- 

- rmgw

<http://www.trustedmedianetworks.com/>

----------------------------------------------------------------------------
Richard Wesley                                  Trusted Media Networks, Inc.

"'You don't know how to manage Looking-glass cakes,' the Unicorn remarked.
 'Hand it round first, and cut it afterwards.'" 
    - Lewis Carroll, _Through The Looking-Glass And What Alice Found There_




More information about the Python-list mailing list