jm-vis's picture
Implement full GAIA agent solution with formatter and multimodal processing
460ec88
Raw History Blame Contribute Delete
1.54 kB
"""
Test runner for GAIA agent components.
This script runs tests for all GAIA agent components including:
- Answer formatter
- Integrated agent
- Multimodal processing
"""
import unittest
import os
import sys
# Ensure we can import from the parent directory
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
# Import test modules
from test_answer_formatter import TestAnswerFormatter
from test_integrated_agent import TestIntegratedAgent
if __name__ == "__main__":
print("Running GAIA agent tests...")
# Create the test loader
loader = unittest.TestLoader()
# Create a test suite including all tests
suite = unittest.TestSuite()
# Add the TestAnswerFormatter tests
print("Adding answer formatter tests...")
formatter_suite = loader.loadTestsFromTestCase(TestAnswerFormatter)
suite.addTest(formatter_suite)
# Add the TestIntegratedAgent tests
print("Adding integrated agent tests...")
integrated_suite = loader.loadTestsFromTestCase(TestIntegratedAgent)
suite.addTest(integrated_suite)
# Run the tests with verbosity
print("\nRunning all tests...\n")
runner = unittest.TextTestRunner(verbosity=2)
result = runner.run(suite)
# Report results
if result.wasSuccessful():
print("\nAll tests passed successfully!")
sys.exit(0)
else:
print("\nSome tests failed!")
print(f"Failures: {len(result.failures)}")
print(f"Errors: {len(result.errors)}")
sys.exit(1)