From 7301bc64bfbe1e855c80756c56a93f7939c5f6c1 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Wed, 3 May 2017 14:38:49 +0200 Subject: [PATCH] Just added __str__ on the main class --- minitest.py | 4 ++++ 1 file changed, 4 insertions(+) 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)