Re: Needed class whose instances are many test cases

2005-11-15 Thread Sumit
Thanks for comments .setup() is going the Run Before every testcase Run. But i need to create resource for set of testcases , it is one time only . I can not create at every instant before testcases Run . thats why Unittest.testsuit is goingto help me out . There __init__() can be Run One time and

Re: Needed class whose instances are many test cases

2005-11-11 Thread Ben Finney
Roy Smith <[EMAIL PROTECTED]> wrote: > Ben Finney <[EMAIL PROTECTED]> wrote: > > Test cases should each run individually, from a known state, and > > not depend on any other tests. You can define a fixture for > > several tests in the unittest.TestCase methods setUp() and > > tearDown(), to establi

Re: Needed class whose instances are many test cases

2005-11-11 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Ben Finney <[EMAIL PROTECTED]> wrote: > This is a poor design; your tests will each be starting in a different > state, and will likely not run the same way if run in a different > order, making them fragile. > > Test cases should each run individually, from a kno

Re: Needed class whose instances are many test cases

2005-11-11 Thread Ben Finney
Sumit <[EMAIL PROTECTED]> wrote: > I have scinario like I have to Create resource(in __init__()) Before > Running a set of testcases and then In Testcases resources are going > to used and then It will cleared off after Running the testcases by > destructor __del__() This is a poor design; your t

Re: Needed class whose instances are many test cases

2005-11-11 Thread Chris Smith
> "Sumit" == Sumit <[EMAIL PROTECTED]> writes: Sumit> I have scinario like I have to Create resource(in Sumit> __init__()) Before Running a set of testcases and then In Sumit> Testcases resources are going to used and then It will Sumit> cleared off after Running the testcases

Needed class whose instances are many test cases

2005-11-11 Thread Sumit
I have scinario like I have to Create resource(in __init__()) Before Running a set of testcases and then In Testcases resources are going to used and then It will cleared off after Running the testcases by destructor __del__() import unittest import time class app_adminfunc(unittest.TestCase):