Re: unittest setup

2009-11-04 Thread Joe Riopel
On Tue, Nov 3, 2009 at 11:02 PM, Jonathan Haddad j...@jonhaddad.com wrote: 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. 

unittest setup

2009-11-03 Thread Jonathan Haddad
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

Re: unittest setup

2009-11-03 Thread Gabriel Genellina
En Wed, 04 Nov 2009 01:02:24 -0300, Jonathan Haddad j...@jonhaddad.com escribió: 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

Re: unittest setup

2005-09-30 Thread Kent Johnson
paul kölle wrote: hi all, I noticed that setUp() and tearDown() is run before and after *earch* test* method in my TestCase subclasses. I'd like to run them *once* for each TestCase subclass. How do I do that. One way to do this is to make a TestSuite subclass that includes your startup

Re: unittest setup

2005-09-25 Thread Diez B. Roggisch
paul kölle wrote: hi all, I noticed that setUp() and tearDown() is run before and after *earch* test* method in my TestCase subclasses. I'd like to run them *once* for each TestCase subclass. How do I do that. Create a global/test instance flag. Diez --

Re: unittest setup

2005-09-25 Thread paul kölle
Diez B. Roggisch wrote: paul kölle wrote: hi all, I noticed that setUp() and tearDown() is run before and after *earch* test* method in my TestCase subclasses. I'd like to run them *once* for each TestCase subclass. How do I do that. Create a global/test instance flag. I'm not sure if I

Re: unittest setup

2005-09-25 Thread George Sakkis
paul kölle [EMAIL PROTECTED] wrote: [snipped] It seems to me my case is not that exotic, I thought it would be quite natural to write the boilerplate stuff in setUp() and build on that to step through the applications state with test* methods each building on top of each other. Is that the

Re: unittest setup

2005-09-25 Thread François Pinard
[George Sakkis] Yes, py.test: http://codespeak.net/py/current/doc/test.html. The whole http://codespeak.net site contains many interesting projects, which are all worth a good look! However, there is a generic ``LICENSE`` file claiming copyrights on all files, without explaining what the