"""Point every directory at a temporary folder before the app modules load.""" import os import tempfile from pathlib import Path _tmp = Path(tempfile.mkdtemp(prefix="bindery-tests-")) for name, sub in [("CONFIG_DIR", "config"), ("INGEST_DIR", "ingest"), ("TMP_DIR", "tmp")]: os.environ[name] = str(_tmp / sub)