Testing¶
Running Tests¶
Slow tests¶
Tests that hit external APIs (Yahoo Finance, OpenAI) are marked with
@pytest.mark.slow and skipped by default. To include them:
Test Structure¶
tests/
├── __init__.py
├── test_config.py # Settings, Hydra, path constants
├── test_data_loader.py # ZIP extraction, PDF loading
├── test_evaluation.py # EvalResult parsing
├── test_financial.py # Chart generation + slow API tests
└── test_report.py # Markdown report output
Writing Tests¶
- Place tests in
tests/test_<module>.py. - Use
tmp_pathfixtures for file-system tests. - Mark API-dependent tests:
Coverage¶
Generates a terminal coverage report. Aim for ≥ 80 % coverage on utility
modules (config, data_loader, evaluation, report).