Re: unittest & setup

2009-11-04 Thread Joe Riopel
On Tue, Nov 3, 2009 at 11:02 PM, Jonathan Haddad 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.  What's > the best w

Re: unittest & setup

2009-11-03 Thread Gabriel Genellina
En Wed, 04 Nov 2009 01:02:24 -0300, Jonathan Haddad 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 created. What's the

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 crea

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 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 copyr

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

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

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 -- http://mail.python.org/mailman/

unittest setup

2005-09-25 Thread paul kölle
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. thanks paul -- http://mail.python.org/mailman/listinfo/python-list