diff --git a/README.md b/README.md index d178b72..70596a1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ minitest A minimalistic testing interface with blessings + +Jump directly to the ifmain part for a more in-depth example diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..830b6a7 --- /dev/null +++ b/__init__.py @@ -0,0 +1 @@ +__all__ = ["minitest"] diff --git a/minitest.py b/minitest.py index 7f04520..dc66419 100755 --- a/minitest.py +++ b/minitest.py @@ -3,6 +3,7 @@ # Copyleft (c) 2016 Cocobug All Rights Reserved. from blessings import Terminal +__all__ =["testGroup","testUnit"] class testGroup(object): """TestGroup, group a number of testUnit, exec them and print the results""" @@ -26,8 +27,8 @@ class testGroup(object): "Execute all tests, some options might exist at some point" module_sucess,module_total=0,0 - print self.prefix+"+"+"-"*(max(0,self.align+7-len(self.prefix))) - print self.prefix+"| Executing test group "+self.pretty_group(self.name) + #print self.prefix+"+"+"-"*(max(0,self.align+7-len(self.prefix))) + print self.prefix+"+ Executing test group "+self.pretty_group(self.name) oldprefix=self.prefix self.prefix+="| " self.results=[] @@ -49,7 +50,7 @@ class testGroup(object): self.prefix=oldprefix print self.pretty_group_result(module_sucess,module_total) - print self.prefix+"+"+"-"*(max(0,self.align+7-len(self.prefix))) + #print self.prefix+"+"+"-"*(max(0,self.align+7-len(self.prefix))) return self.results def print_result(self,table): @@ -70,7 +71,7 @@ class testGroup(object): def pretty_group_result(self,module_sucess,module_total): "Prettyfying the result of the batch of tests" - bloc=self.prefix+"| Done " + bloc=self.prefix+"+ Done " return bloc+self.pretty_group(self.name)+self.pretty_dots(bloc,len(self.name))+self.pretty_succesrate(module_sucess,module_total) def pretty_name(self,item):