diff --git a/conftest.py b/conftest.py new file mode 100644 index 00000000..43fe5c5e --- /dev/null +++ b/conftest.py @@ -0,0 +1,9 @@ +"""pytest: setup.py's data-folder migration (#198) saves the data folder it settled on in the user's settings file +(%APPDATA%\Strata\settings.json, ~/.config/strata/settings.json) and can MOVE model files from a folder it finds there. +A test that reaches it must never touch the real file, so the whole session gets its own config home.""" +import os +import tempfile + +_home = tempfile.mkdtemp(prefix="strata-pytest-config-") +os.environ["APPDATA"] = _home +os.environ["XDG_CONFIG_HOME"] = _home