Isolate mock_paths fixture from host MOUNT_ROOT config; simplify probe_target mount check

mock_paths patched TARGET_DIR/PENDING_DIR/etc but not MOUNT_ROOT, so tests leaked the host's real ~/pCloudDrive mount_root config and failed probe_target's mountpoint check. Also drop redundant equality clause since is_relative_to already covers equal paths, and document the mount precondition.
This commit is contained in:
n0mad1k
2026-07-10 14:40:36 -04:00
parent 22b1415b43
commit ef3d556b6d
2 changed files with 6 additions and 2 deletions
+1
View File
@@ -37,6 +37,7 @@ def mock_paths(tmp_path, monkeypatch):
pending_dir.mkdir()
log_dir.mkdir()
monkeypatch.setattr(coe_mirror, "MOUNT_ROOT", None)
monkeypatch.setattr(coe_mirror, "TARGET_DIR", target_dir)
monkeypatch.setattr(coe_mirror, "PENDING_DIR", pending_dir)
monkeypatch.setattr(coe_mirror, "LOG_DIR", log_dir)