Commit Graph

2 Commits

Author SHA1 Message Date
Ahmet Guzererler 57c9b3ecaa refactor(tests): consolidate live-API tests into integration/, move mocked tests to unit/
- Replaced 7 duplicate live-API test files in tests/ root with:
  - tests/integration/test_scanner_live.py — consolidated scanner + yfinance + vendor fallback tests (marked @pytest.mark.integration, excluded from default run)
  - tests/e2e/test_llm_e2e.py — LLM e2e test extracted from test_scanner_comprehensive
  - tests/unit/test_industry_deep_dive.py — mocked _extract_top_sectors + run_tool_loop tests
  - tests/unit/test_scanner_fallback.py — mocked AV failover tests
- Removed record_mode hardcode from integration/conftest.py (VCR.py cannot intercept curl_cffi used by yfinance; integration tests run live against real APIs on demand)

Deleted: test_scanner_tools, test_scanner_end_to_end, test_scanner_complete_e2e,
         test_scanner_final, test_scanner_comprehensive, test_scanner_fallback,
         test_industry_deep_dive

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 14:24:52 +01:00
Ahmet Guzererler 8c9183cf10 Add integration and unit tests for scanner routing, TTM analysis, vendor fail-fast, and yfinance data layer
- Implement integration tests for scanner vendor routing, ensuring correct routing to Alpha Vantage and fallback to yfinance.
- Create comprehensive unit tests for TTM analysis, covering metrics computation and report formatting.
- Introduce fail-fast vendor routing tests to verify immediate failure for methods not in FALLBACK_ALLOWED.
- Develop extensive integration tests for the yfinance data layer, mocking external calls to validate functionality across various financial data retrieval methods.
2026-03-19 13:51:57 +01:00