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 55e1460 commit f154406
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 0 additions & 1 deletion tests/reloc/dir2

This file was deleted.

11 changes: 8 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,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
Expand Down

0 comments on commit f154406

Please sign in to comment.