Mercurial > repos > shellac > sam_consensus_v3
diff env/lib/python3.9/site-packages/cwltool/tests/test_relocate.py @ 0:4f3585e2f14b draft default tip
"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author | shellac |
---|---|
date | Mon, 22 Mar 2021 18:12:50 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/env/lib/python3.9/site-packages/cwltool/tests/test_relocate.py Mon Mar 22 18:12:50 2021 +0000 @@ -0,0 +1,35 @@ +import json +import sys +from pathlib import Path + +from cwltool.main import main + +from .util import get_data, needs_docker + +if sys.version_info[0] < 3: + from StringIO import StringIO +else: + from io import StringIO + + +@needs_docker +def test_for_910() -> None: + assert main([get_data("tests/wf/910.cwl")]) == 0 + assert main([get_data("tests/wf/910.cwl")]) == 0 + + +@needs_docker +def test_for_conflict_file_names(tmp_path: Path) -> None: + stream = StringIO() + + assert ( + main( + ["--debug", "--outdir", str(tmp_path), get_data("tests/wf/conflict.cwl")], + stdout=stream, + ) + == 0 + ) + + out = json.loads(stream.getvalue()) + assert out["b1"]["basename"] == out["b2"]["basename"] + assert out["b1"]["location"] != out["b2"]["location"]