Files
last30days-skill/tests/test_env_include_sources_default.py
2026-04-24 11:52:48 -04:00

20 lines
597 B
Python

import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "skills" / "last30days"))
from scripts.lib import env
def test_include_sources_defaults_to_empty_string(monkeypatch, tmp_path):
# Ensure the env var is not set
monkeypatch.delenv("INCLUDE_SOURCES", raising=False)
# Avoid reading any real user config file by patching the resolved module path directly
monkeypatch.setattr(env, "CONFIG_FILE", tmp_path / "does-not-exist.env")
cfg = env.get_config()
assert "INCLUDE_SOURCES" in cfg
assert cfg["INCLUDE_SOURCES"] == ""