示例#1
0
文件: bash.py 项目: Auzzy/pyinq
 def section(self, label, name, nl=True):
     if name:
         line = "\n{label}: {name}".format(label=label.upper(),name=name)
         line += '\n' if nl else ''
         color_print(line,fore=WHITE.bold())
     elif nl:
         print
示例#2
0
文件: bash.py 项目: Auzzy/pyinq
    def log_test(self, label, results):
        line = "{label}: {name}".format(label=label,name=results.name)
        color_print(line,fore=WHITE.bold())

        if results:
            Printer._print_status(results)
            Printer._print_results(results)
        else:
            Printer._print_no_asserts()

        print
示例#3
0
文件: bash.py 项目: Auzzy/pyinq
 def _print_result(result):
     if result.result is None:
         color_print(result,fore=BLUE.bold())
     elif result.result:
         color_print(result,fore=GREEN.bold())
     else:
         color_print(result,fore=RED.bold())
示例#4
0
文件: bash.py 项目: Auzzy/pyinq
 def _print_status(results):
     status = results.get_status()
     if status is None:
         color_print("ERROR",back=BLUE.bold())
     elif status:
         color_print("PASSED",back=GREEN.bold())
     else:
         color_print("FAILED",back=RED.bold())
示例#5
0
文件: bash.py 项目: Auzzy/pyinq
 def _print_no_asserts():
     color_print("NO ASSERTS",fore=BLACK.bold(),back=WHITE)
示例#6
0
文件: bash.py 项目: Auzzy/pyinq
 def title(self, title):
     color_print("\n\n{0}".format(title.upper()),fore=WHITE.bold())