(args)
| 532 | |
| 533 | |
| 534 | def main(args): |
| 535 | runner = TimeCostTextTestRunner() |
| 536 | if args.suites is not None and len(args.suites) > 0: |
| 537 | logger.info('Running: %s' % ' '.join(args.suites)) |
| 538 | test_suite = gather_test_suites_in_files(args.test_dir, args.suites, |
| 539 | args.list_tests) |
| 540 | else: |
| 541 | test_suite = gather_test_cases(args.test_dir, args.pattern, |
| 542 | args.list_tests) |
| 543 | if not args.list_tests: |
| 544 | result = runner.run(test_suite) |
| 545 | logger.info('Running case completed, pid: %s, suites: %s' % |
| 546 | (os.getpid(), args.suites)) |
| 547 | result = collect_test_results(result) |
| 548 | df = test_cases_result_to_df(result) |
| 549 | if args.result_dir is not None: |
| 550 | save_test_result(df, args) |
| 551 | else: |
| 552 | print_table_result(df) |
| 553 | print_abnormal_case_info(df) |
| 554 | statistics_test_result(df) |
| 555 | |
| 556 | |
| 557 | def patch_transformers_for_safe_models(): |
no test coverage detected
searching dependent graphs…