Skip to content

Commit 1c53f89

Browse files
committed
Add symlink test for local checkout of cable
1 parent 6731ec0 commit 1c53f89

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/test_workdir.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,20 @@ def revision_log_file(self) -> Path:
8585
def pbs_job_file(self, request) -> Path:
8686
return Path(request.param)
8787

88-
def test_clean_realisation_files(self, src_path, revision_log_file):
88+
def test_clean_realisation_files(
89+
self, src_path: Path, tmp_path: Path, revision_log_file: Path
90+
):
8991
"""Success case: directory tree does not exist after clean."""
9092
src_path.mkdir()
93+
cable_symlink = src_path / "main"
94+
# tmp_path contains the path being symlinked
95+
local_cable_src_path = tmp_path / "CABLE"
96+
local_cable_src_path.mkdir()
97+
cable_symlink.symlink_to(local_cable_src_path)
9198
revision_log_file.touch()
9299
clean_realisation_files()
100+
101+
assert local_cable_src_path.exists()
93102
assert not src_path.exists()
94103
assert not revision_log_file.exists()
95104

0 commit comments

Comments
 (0)