# test_all_tools.py import os import sys from dotenv import load_dotenv from pathlib import Path # Load environment variables load_dotenv() # Add tools directory to path sys.path.append(os.path.join(os.path.dirname(__file__), '..')) def main(): """Run all tool tests""" print("=" * 60) print("๐Ÿงช TESTING ALL TOOLS") print("=" * 60) # Check if OpenRouter API key is loaded openrouter_key = os.getenv("OPENROUTER_API_KEY") if openrouter_key: print(f"โœ… OpenRouter API Key loaded: {openrouter_key[:8]}...") else: print("โŒ OpenRouter API Key not found in environment") print("Please add OPENROUTER_API_KEY to your .env file") # Import and run individual test modules try: print("\n๐Ÿ”ง Testing Math Tools...") from test_math_tools import test_math_tools test_math_tools() print("\n๐Ÿ” Testing Search Tools...") from test_search_tools import test_search_tools test_search_tools() print("\n๐ŸŽจ Testing Multimodal Tools...") from test_multimodal_tools import test_multimodal_tools test_multimodal_tools() print("\n๐Ÿ“บ Testing YouTube Tools...") from test_youtube_tools import test_youtube_tools test_youtube_tools() print("\n" + "=" * 60) print("โœ… ALL TESTS COMPLETED SUCCESSFULLY!") print("=" * 60) # Usage examples print("\n๐Ÿ“š Quick Usage Examples:") print("from tools import get_video_info, search_web, add, analyze_image") print("video_info = get_video_info('https://youtube.com/watch?v=...')") print("search_results = search_web('Python programming')") print("result = add(10, 5)") print("image_desc = analyze_image('photo.jpg', 'What is in this image?')") except Exception as e: print(f"\nโŒ Error running tests: {str(e)}") import traceback traceback.print_exc() if __name__ == "__main__": main()