| 76 | return f"{BRIGHT_GREEN}{percent:.1f}% [{bar}]{RESET}" |
| 77 | |
| 78 | def parse_args(self): |
| 79 | parser = argparse.ArgumentParser(description="Run Python tests") |
| 80 | parser.add_argument("-p", "--print-output", action="store_true", help="Print test output", default=False) |
| 81 | parser.add_argument("-t", "--test", nargs="+", type=str, help="Test name", default=["all"]) |
| 82 | parser.add_argument("-i", "--ignore", nargs="+", type=str, help="Ignore test name", default=None) |
| 83 | parser.add_argument("-s", "--save", nargs="?", default=None, const=default_save_path, help="Save test log.") |
| 84 | parser.add_argument("-n", "--parallel_num", type=int, help="Number of parallel tests", default=10) |
| 85 | |
| 86 | args = parser.parse_args() |
| 87 | return args |
| 88 | |
| 89 | def generate_test_report(self, test_results: Dict[str, TestResult]) -> str: |
| 90 | total_tests = len(test_results) |