llms-txt-mcp / tests /conftest.py
shern
almost camera ready
1c9e323
raw
history blame contribute delete
565 Bytes
"""Pytest configuration and fixtures."""
import pytest
import os
from pathlib import Path
@pytest.fixture
def mock_env():
"""Mock environment variables for testing."""
os.environ["MISTRAL_API_KEY"] = "test-api-key"
os.environ["LOG_LEVEL"] = "DEBUG"
yield
# Cleanup
if "MISTRAL_API_KEY" in os.environ:
del os.environ["MISTRAL_API_KEY"]
if "LOG_LEVEL" in os.environ:
del os.environ["LOG_LEVEL"]
@pytest.fixture
def test_data_path():
"""Path to test data directory."""
return Path(__file__).parent / "fixtures"