"""Project-level pytest conftest.

SP-A2: autouse fixture that resets all webai_cache TTLCaches between tests
so screener/portfolio/news cache state does not leak across test cases.
"""
import pytest
from app import webai_cache


@pytest.fixture(autouse=True)
def _reset_webai_cache():
    webai_cache.PORTFOLIO_CACHE.clear()
    webai_cache.NEWS_CACHE.clear()
    webai_cache.SCREENER_CACHE.clear()
    yield
