MCPcopy Index your code
hub / github.com/modelscope/modelscope / main

Function main

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

Source from the content-addressed store, hash-verified

532
533
534def 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
557def patch_transformers_for_safe_models():

Callers 1

run.pyFile · 0.70

Calls 11

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
infoMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…