Skip to content

Commit

Permalink
tests: make relocation test not require symlinked directory in the so…
Browse files Browse the repository at this point in the history
…urce tree.
  • Loading branch information
mr-c committed Oct 11, 2023
1 parent acb034a commit ccde95b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Empty file removed tests/reloc/dir1/foo
Empty file.
1 change: 0 additions & 1 deletion tests/reloc/dir2

This file was deleted.

12 changes: 9 additions & 3 deletions tests/test_relocate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import json
import os
import shutil
import sys
from pathlib import Path

Expand Down Expand Up @@ -56,15 +58,19 @@ def test_for_conflict_file_names_nodocker(tmp_path: Path) -> None:


def test_relocate_symlinks(tmp_path: Path) -> None:
shutil.copy(get_data("tests/reloc/test.cwl"), tmp_path)
(tmp_path / "dir1").mkdir()
(tmp_path / "dir1" / "foo").touch()
os.symlink(tmp_path / "dir1", tmp_path / "dir2")
assert (
main(
[
"--debug",
"--outdir",
get_data("tests/reloc") + "/dir2",
get_data("tests/reloc/test.cwl"),
str(tmp_path / "dir2"),
str(tmp_path / "test.cwl"),
"--inp",
get_data("tests/reloc") + "/dir2",
str(tmp_path / "dir2"),
]
)
== 0
Expand Down

0 comments on commit ccde95b

Please sign in to comment.