MCPcopy
hub / github.com/modelscope/ms-swift / main

Function main

tests/run.py:524–541  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

522
523
524def main(args):
525 runner = TimeCostTextTestRunner()
526 if args.suites is not None and len(args.suites) > 0:
527 logger.info('Running: %s' % ' '.join(args.suites))
528 test_suite = gather_test_suites_in_files(args.test_dir, args.suites, args.list_tests)
529 else:
530 test_suite = gather_test_cases(os.path.abspath(args.test_dir), args.pattern, args.list_tests)
531 if not args.list_tests:
532 result = runner.run(test_suite)
533 logger.info('Running case completed, pid: %s, suites: %s' % (os.getpid(), args.suites))
534 result = collect_test_results(result)
535 df = test_cases_result_to_df(result)
536 if args.result_dir is not None:
537 save_test_result(df, args)
538 else:
539 print_table_result(df)
540 print_abnormal_case_info(df)
541 statistics_test_result(df)
542
543
544if __name__ == '__main__':

Callers 1

run.pyFile · 0.70

Calls 10

runMethod · 0.95
gather_test_casesFunction · 0.85
collect_test_resultsFunction · 0.85
test_cases_result_to_dfFunction · 0.85
save_test_resultFunction · 0.85
print_table_resultFunction · 0.85
print_abnormal_case_infoFunction · 0.85
statistics_test_resultFunction · 0.85

Tested by

no test coverage detected