import pytest import sys import os from pathlib import Path # Add the backend directory to Python path for imports backend_dir = Path(__file__).parent sys.path.insert(0, str(backend_dir)) # Also add the current directory to ensure imports work current_dir = Path(__file__).parent sys.path.insert(0, str(current_dir)) @pytest.fixture def sample_data(): """Sample data fixture for testing""" return { "name": "test", "value": 42, "items": [1, 2, 3] } @pytest.fixture def test_files_dir(): """Fixture to get the test files directory""" return Path(__file__).parent / "tests" @pytest.fixture(autouse=True) def setup_test_environment(): """Setup test environment before each test""" # Add any test environment setup here yield # Add any cleanup here