Just added __str__ on the main class

This commit is contained in:
Maximilien Rigaut 2017-05-03 14:38:49 +02:00
parent 07282d9a82
commit 7301bc64bf
1 changed files with 4 additions and 0 deletions

View File

@ -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)