Skip to content

Commit f7e3350

Browse files
committed
test(config): isolate load_config no-args test by monkeypatching cwd to tmp_path
1 parent e00d3fe commit f7e3350

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tests/core/test_config.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,8 +611,8 @@ def test_load_config_explicit_path_bypasses_scoping(tmp_path):
611611
def test_load_config_no_args_uses_scope_resolution(tmp_path, monkeypatch):
612612
"""load_config() with no args routes through scoped pipeline."""
613613
monkeypatch.setenv("PYTHINKER_SHARE_DIR", str(tmp_path))
614+
monkeypatch.chdir(tmp_path) # no .git in tmp_path → user-only scope
614615
(tmp_path / "config.toml").write_text('theme = "light"\n', encoding="utf-8")
615-
# No git root in tmp_path — falls back to user-only
616616
config = load_config()
617617
assert config.theme == "light"
618618
assert "user" in config.source_scopes

0 commit comments

Comments
 (0)