Re: SetUp functions for multiple test cases

2009-01-20 Thread brooklineTom
On Jan 20, 9:57 am, Roy Smith wrote: > In article > <45b0bf56-673c-40cd-a27a-62f9943d9...@r41g2000prr.googlegroups.com>, > Georg Schmid wrote: > > > I've just started working with unittests and already hit a snag. I > > couldn't find out how to implement a setup function, that is executed > > on

Re: SetUp functions for multiple test cases

2009-01-20 Thread Duncan Booth
Roy Smith wrote: > You might have your setUp() method re-assign the global to an instance > variable and then your test cases can access it via self.whatever. > The reason for that is if at some point in the future you change your > mind and decide to re-build the database in setUp() for each te

Re: SetUp functions for multiple test cases

2009-01-20 Thread Georg Schmid
On Jan 20, 3:57 pm, Roy Smith wrote: > In article > <45b0bf56-673c-40cd-a27a-62f9943d9...@r41g2000prr.googlegroups.com>, >  Georg Schmid wrote: > > > I've just started working with unittests and already hit a snag. I > > couldn't find out how to implement a setup function, that is executed > > on

Re: SetUp functions for multiple test cases

2009-01-20 Thread Roy Smith
In article <45b0bf56-673c-40cd-a27a-62f9943d9...@r41g2000prr.googlegroups.com>, Georg Schmid wrote: > I've just started working with unittests and already hit a snag. I > couldn't find out how to implement a setup function, that is executed > only _once_ before all of the tests. Specifically, I

Re: SetUp functions for multiple test cases

2009-01-20 Thread Diez B. Roggisch
Georg Schmid wrote: > I've just started working with unittests and already hit a snag. I > couldn't find out how to implement a setup function, that is executed > only _once_ before all of the tests. Specifically, I need this for > testing my database interface, and naturally I don't want to creat

SetUp functions for multiple test cases

2009-01-20 Thread Georg Schmid
I've just started working with unittests and already hit a snag. I couldn't find out how to implement a setup function, that is executed only _once_ before all of the tests. Specifically, I need this for testing my database interface, and naturally I don't want to create a new database in-memory an