3
__init__ para unittest.TestCase
Eu gostaria de acrescentar algumas coisas ao que a unittest.TestCaseclasse faz ao ser inicializada, mas não consigo descobrir como fazer isso. Agora estou fazendo isso: #filename test.py class TestingClass(unittest.TestCase): def __init__(self): self.gen_stubs() def gen_stubs(self): # Create a couple of tempfiles/dirs etc etc. self.tempdir = tempfile.mkdtemp() # more stuff here Gostaria …
122
python
unit-testing