diff --git a/minitest.py b/minitest.py index 8f745eb..b119826 100755 --- a/minitest.py +++ b/minitest.py @@ -102,6 +102,9 @@ class testGroup(object): txt=self.failure_text return wrap(txt+" ["+str(sucess)+"/"+str(total)+"]") + def __str__(self): + return self.name + class testUnit(object): """A very basic test unit, only test() is mandatory test(): should return a list of [function,status,infos] @@ -133,6 +136,7 @@ class testUnit(object): def addResult(self,testName,status,info): self.results.append([testName,status,info]) + if __name__ == '__main__': term=Terminal() mainClasses=testGroup("Main Classes",term,verbose=True)