# #region TranslatePluginTestConftest [C:1] [TYPE Module] [SEMANTICS test, conftest]
# @BRIEF Shared fixtures for co-located translate plugin tests.
import os
import tempfile

# Ensure DATABASE_URL is set before any src module imports
if not os.environ.get("DATABASE_URL"):
    _TEST_DB = tempfile.NamedTemporaryFile(suffix="_ss_tools_test.db", delete=False)
    os.environ["DATABASE_URL"] = f"sqlite:///{_TEST_DB.name}"
    os.environ["AUTH_DATABASE_URL"] = f"sqlite:///{_TEST_DB.name}"

# #endregion TranslatePluginTestConftest
