unittest & setup

Jonathan Haddad jon at jonhaddad.com
Tue Nov 3 23:02:24 EST 2009


Maybe I'm doing something wrong here, definitely not the most experienced
unit tester.

I've got a class, in the constructor it loads a CSV file from disc.  I'd
like only 1 instance of the class to be instantiated.  However, when running
multiple unit tests, multiple instances of the class are created.  What's
the best way for me to avoid this?  It takes about a few seconds to load the
CSV file.
-- 
Jonathan Haddad
http://www.rustyrazorblade.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20091103/78847437/attachment.html>


More information about the Python-list mailing list