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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user