"""Shared test fixtures for PromptGarage.""" import os import sys import pytest # Allow imports from project root sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) import db @pytest.fixture(autouse=True) def temp_db(tmp_path, monkeypatch): """Use a temporary database for each test.""" test_db = str(tmp_path / "test_prompts.db") monkeypatch.setattr(db, "DB_PATH", test_db) db.init_db() yield test_db