MCPcopy Create free account
hub / github.com/Topdu/OpenOCR / main

Function main

test_openocr.py:347–376  ·  view source on GitHub ↗

Main test entry point

()

Source from the content-addressed store, hash-verified

345
346
347def main():
348 """Main test entry point"""
349 import argparse
350
351 parser = argparse.ArgumentParser(description='Test OpenOCR functionality')
352 parser.add_argument(
353 '--test-type',
354 type=str,
355 default='all',
356 choices=['all', 'python', 'cli'],
357 help='Type of tests to run: all (default), python (API only), cli (command-line only)'
358 )
359
360 args = parser.parse_args()
361
362 try:
363 tester = OpenOCRTester()
364
365 if args.test_type == 'all':
366 tester.run_all_tests()
367 elif args.test_type == 'python':
368 tester.test_python_api()
369 elif args.test_type == 'cli':
370 tester.test_command_line()
371
372 except Exception as e:
373 logger.error(f'Test suite failed: {e}')
374 import traceback
375 traceback.print_exc()
376 sys.exit(1)
377
378
379if __name__ == '__main__':

Callers 1

test_openocr.pyFile · 0.70

Calls 5

run_all_testsMethod · 0.95
test_python_apiMethod · 0.95
test_command_lineMethod · 0.95
OpenOCRTesterClass · 0.85
parse_argsMethod · 0.45

Tested by

no test coverage detected