# Tests This directory contains all tests for the LLM Model Therapist Tool. ## Structure ``` tests/ ├── test_evaluators/ # Evaluator tests │ ├── test_talk_type_evaluator.py │ └── ... ├── test_parsers/ # Parser tests │ └── test_conversation_parser.py ├── test_services/ # Service layer tests │ ├── test_orchestrator.py │ └── test_key_manager.py ├── test_providers/ # Provider client tests │ ├── test_openai_client.py │ └── test_huggingface_client.py └── fixtures/ # Test data ├── sample_conversations/ └── mock_responses/ ``` ## Running Tests ### Run all tests ```bash cd /Users/ryan/Dev/LLM_Model_Therapist_Tool/web python -m pytest tests/ ``` ### Run specific test module ```bash python -m pytest tests/test_evaluators/test_talk_type_evaluator.py ``` ### Run a specific test file directly ```bash cd /Users/ryan/Dev/LLM_Model_Therapist_Tool/web python tests/test_evaluators/test_talk_type_evaluator.py ``` ### Test with command-line arguments ```bash # Test single utterance python tests/test_evaluators/test_talk_type_evaluator.py "I want to quit smoking" # Test with debug mode python tests/test_evaluators/test_talk_type_evaluator.py --debug "I want to quit smoking" ``` ## Test Conventions - Test files should be named `test_.py` - Test functions should be named `test_()` - Use fixtures from `fixtures/` directory for sample data - Mock external API calls when possible to avoid rate limits - Use environment variables for API keys (fallback to test keys for CI) ## Environment Variables ```bash export HF_API_KEY="your_huggingface_key" export OPENAI_API_KEY="your_openai_key" ```