MCPcopy
hub / github.com/tanelpoder/0xtools / main

Function main

xtop/tests/test_runner.py:393–443  ·  view source on GitHub ↗

Main entry point

()

Source from the content-addressed store, hash-verified

391
392
393def main():
394 """Main entry point"""
395 parser = argparse.ArgumentParser(
396 description='Streamlined test runner for XTOP',
397 formatter_class=argparse.RawDescriptionHelpFormatter,
398 epilog="""
399Examples:
400 python3 test_runner.py # Run all tests
401 python3 test_runner.py basic # Run basic tests only
402 python3 test_runner.py -v # Verbose output
403 python3 test_runner.py --save # Save results to JSON
404 """
405 )
406
407 parser.add_argument(
408 'suite',
409 nargs='?',
410 choices=['all', 'basic', 'latency', 'stack', 'advanced', 'format', 'schema', 'ui'],
411 default='all',
412 help='Test suite to run (default: all)'
413 )
414
415 parser.add_argument(
416 '-v', '--verbose',
417 action='store_true',
418 help='Show detailed output'
419 )
420
421 parser.add_argument(
422 '--save',
423 action='store_true',
424 help='Save results to JSON file'
425 )
426
427 args = parser.parse_args()
428
429 # Create runner
430 runner = XtopTestRunner(verbose=args.verbose)
431
432 # Run tests
433 if args.suite == 'all':
434 success = runner.run_all()
435 else:
436 success = runner.run_suite(args.suite)
437
438 # Save results if requested
439 if args.save and runner.suites:
440 runner.save_results()
441
442 # Exit with appropriate code
443 sys.exit(0 if success else 1)
444
445
446if __name__ == '__main__':

Callers 1

test_runner.pyFile · 0.70

Calls 7

parse_argsMethod · 0.95
run_allMethod · 0.95
run_suiteMethod · 0.95
save_resultsMethod · 0.95
XtopTestRunnerClass · 0.85
exitMethod · 0.80
add_argumentMethod · 0.45

Tested by

no test coverage detected