"""
Pytest configuration for strategy tests.

Sets up necessary fixtures and configurations for testing advanced search strategies.
"""

import pytest
from loguru import logger


def pytest_configure(config):
    """Configure pytest hooks."""
    # Add custom MILESTONE log level if it doesn't exist
    try:
        logger.level("MILESTONE")
    except ValueError:
        logger.level("MILESTONE", no=25, color="<cyan>", icon="🎯")


@pytest.fixture(autouse=True)
def setup_milestone_logger():
    """Ensure MILESTONE log level exists for tests that use it."""
    try:
        logger.level("MILESTONE")
    except ValueError:
        logger.level("MILESTONE", no=25, color="<cyan>", icon="🎯")
    yield
