"""Pytest bootstrap: isolate tests from the real ~/.mytoolkit. config.py and templates_registry.py resolve MYTOOLKIT_HOME at import time and instantiate a module-level singleton, so the env var must be set before any mytoolkit module is imported. """ import os import tempfile os.environ["MYTOOLKIT_HOME"] = tempfile.mkdtemp(prefix="mytoolkit-test-home-")