diff --git a/__pycache__/minitest.cpython-36.pyc b/__pycache__/minitest.cpython-36.pyc index 740f26e..7523e0c 100644 Binary files a/__pycache__/minitest.cpython-36.pyc and b/__pycache__/minitest.cpython-36.pyc differ diff --git a/minitest.py b/minitest.py index bb5d7b5..7042f09 100755 --- a/minitest.py +++ b/minitest.py @@ -1,8 +1,33 @@ #!/usr/bin/env python # Copyleft (c) 2016 Cocobug All Rights Reserved. +try: + from blessings import Terminal +except: + class Terminal(): + "Just output empty strings" + def __init__(self): + pass + def __repr__(self): + return "" + def __eq__(self,ot): + return False + def __str__(self): + return "" + def __getattr__(self,attr): + return Color() + + class Color(): + def __init__(self): + pass + def __str__(self): + return "" + def __call__(self,attr): + return attr + def __getattr__(self,attr): + return attr + -from blessings import Terminal import types,string,traceback,sys __all__ =["testGroup","testUnit"] @@ -22,6 +47,7 @@ class testGroup(object): self.name=name self.t=terminal self.prefix=prefix + (self.t) if self.t==None: self.t=Terminal() self.results=[] @@ -75,7 +101,7 @@ class testGroup(object): def get_status(self): "Get the status of every module, if no test was run, should return an empty dict" return self.status_modules - + def print_result(self,table): "Get the array of success/failures and print according to the options (still none yet)" total=len(table)