diff --git a/tests/reloc/dir2 b/tests/reloc/dir2 deleted file mode 120000 index df490f837a..0000000000 --- a/tests/reloc/dir2 +++ /dev/null @@ -1 +0,0 @@ -dir1 \ No newline at end of file diff --git a/tests/test_relocate.py b/tests/test_relocate.py index e3c7e59c86..8ef6fe3e30 100644 --- a/tests/test_relocate.py +++ b/tests/test_relocate.py @@ -1,4 +1,6 @@ import json +import os +import shutil import sys from pathlib import Path @@ -56,15 +58,18 @@ def test_for_conflict_file_names_nodocker(tmp_path: Path) -> None: def test_relocate_symlinks(tmp_path: Path) -> None: + shutil.copyfile(get_data("tests/reloc/test.cwl"), tmp_path) + shutil.copytree(get_data("tests/reloc/dir1"), tmp_path) + os.symlink(tmp_path / "dir1", tmp_path / "dir2") assert ( main( [ "--debug", "--outdir", - get_data("tests/reloc") + "/dir2", - get_data("tests/reloc/test.cwl"), + tmp_path / "/dir2", + tmp_path / "test.cwl", "--inp", - get_data("tests/reloc") + "/dir2", + tmp_path / "/dir2", ] ) == 0