Spaces:
Sleeping
Sleeping
File size: 703 Bytes
acd8e16 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
"""
Pytest configuration and fixtures for NL→SQL Leaderboard tests.
"""
import os
import sys
import pytest
from pathlib import Path
# Add src to path for imports
sys.path.append('src')
# Set test environment variables
os.environ["MOCK_MODE"] = "true"
os.environ["HF_TOKEN"] = "" # Ensure no real API calls during tests
@pytest.fixture
def mock_mode():
"""Fixture to ensure mock mode is enabled for tests."""
os.environ["MOCK_MODE"] = "true"
return True
@pytest.fixture
def test_data_dir():
"""Fixture to get the test data directory."""
return Path("tasks")
@pytest.fixture
def config_dir():
"""Fixture to get the configuration directory."""
return Path("config")
|