e74b0e1e93
Add a pytest-discovered tests/conftest.py for the last30days scripts path and remove duplicate per-file sys.path.insert boilerplate from tests. Normalize affected imports to rely on the shared scripts path and remove the now-unneeded E402 suppressions.
15 lines
464 B
Python
15 lines
464 B
Python
from 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"] == ""
|