Steven D'Aprano wrote:
> D. Guandalino wrote:
>> In this case is there a
>> way to force just one setUp() call?
>
>
> I don't know if this is the best way, but the first way that comes to
> mind is this:
>
>
> class C(TestCase):
> initialised = False
> def setUp(self):
> if
D. Guandalino wrote:
Suppose I have this TestCase class.
class C(TestCase):
def setUp():
# very time consuming and resources intensive stuffs.
pass
def test_A(self):
pass
def test_B(self):
pass
def test_C(self):
pass
The unittest docs says:
Each i
Suppose I have this TestCase class.
class C(TestCase):
def setUp():
# very time consuming and resources intensive stuffs.
pass
def test_A(self):
pass
def test_B(self):
pass
def test_C(self):
pass
The unittest docs says:
> Each instance of the TestCas