7
Esecuzione di test singoli da unittest.TestCase tramite riga di comando
Nel nostro team, definiamo la maggior parte dei casi di test come questo: Una classe "quadro" ourtcfw.py: import unittest class OurTcFw(unittest.TestCase): def setUp: # something # other stuff that we want to use everywhere e molti casi di test come testMyCase.py: import localweather class MyCase(OurTcFw): def testItIsSunny(self): self.assertTrue(localweather.sunny) def testItIsHot(self): …