()
| 409 | |
| 410 | |
| 411 | def main(): |
| 412 | parser = argparse.ArgumentParser( |
| 413 | description="Test the Interactions API integration" |
| 414 | ) |
| 415 | parser.add_argument( |
| 416 | "--mode", |
| 417 | choices=["test", "interactive"], |
| 418 | default="test", |
| 419 | help=( |
| 420 | "Run mode: 'test' runs automated tests, 'interactive' for manual" |
| 421 | " testing" |
| 422 | ), |
| 423 | ) |
| 424 | parser.add_argument( |
| 425 | "--debug", |
| 426 | action="store_true", |
| 427 | help="Enable debug logging", |
| 428 | ) |
| 429 | |
| 430 | args = parser.parse_args() |
| 431 | |
| 432 | if args.debug: |
| 433 | logs.setup_adk_logger(level=logging.DEBUG) |
| 434 | else: |
| 435 | logs.setup_adk_logger(level=logging.INFO) |
| 436 | |
| 437 | start_time = time.time() |
| 438 | |
| 439 | if args.mode == "test": |
| 440 | success = asyncio.run(run_all_tests()) |
| 441 | if not success: |
| 442 | exit(1) |
| 443 | |
| 444 | elif args.mode == "interactive": |
| 445 | asyncio.run(interactive_mode()) |
| 446 | |
| 447 | end_time = time.time() |
| 448 | print(f"\nTotal execution time: {end_time - start_time:.2f} seconds") |
| 449 | |
| 450 | |
| 451 | if __name__ == "__main__": |
no test coverage detected