updated tests

This commit is contained in:
Brian Bjarke Jensen
2025-11-06 22:06:34 +01:00
parent b36f5eb183
commit 41636cce77
3 changed files with 154 additions and 16 deletions
+14
View File
@@ -0,0 +1,14 @@
"""Root conftest for all tests."""
import os
import tempfile
import pytest
def pytest_configure(config: pytest.Config) -> None:
"""Configure pytest environment before any imports happen."""
# Set DATA_DIR before any modules are imported
if "DATA_DIR" not in os.environ:
tmpdir = tempfile.mkdtemp(prefix="baby_monitor_test_")
os.environ["DATA_DIR"] = tmpdir
os.environ["ENVIRONMENT"] = "development"