github-actions[bot]
Deploy from GitHub Actions (commit: 8b247ffacd77c0672965b8378f1d52a7dcd187ae)
9366995
| # 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_<module_name>.py` | |
| - Test functions should be named `test_<functionality>()` | |
| - 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" | |
| ``` | |