# ABOUTME: Pytest configuration and fixtures for AnimalTrack tests. # ABOUTME: Provides database fixtures, test clients, and common utilities. import os import tempfile import pytest @pytest.fixture def temp_db_path(): """Create a temporary database file path for testing.""" with tempfile.NamedTemporaryFile(suffix=".db", delete=False) as f: db_path = f.name yield db_path # Cleanup if os.path.exists(db_path): os.unlink(db_path) # Also clean up WAL files if they exist for suffix in ["-shm", "-wal", "-journal"]: wal_path = db_path + suffix if os.path.exists(wal_path): os.unlink(wal_path)