comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:4f3585e2f14b
1 import json
2 import sys
3 from pathlib import Path
4
5 from cwltool.main import main
6
7 from .util import get_data, needs_docker
8
9 if sys.version_info[0] < 3:
10 from StringIO import StringIO
11 else:
12 from io import StringIO
13
14
15 @needs_docker
16 def test_for_910() -> None:
17 assert main([get_data("tests/wf/910.cwl")]) == 0
18 assert main([get_data("tests/wf/910.cwl")]) == 0
19
20
21 @needs_docker
22 def test_for_conflict_file_names(tmp_path: Path) -> None:
23 stream = StringIO()
24
25 assert (
26 main(
27 ["--debug", "--outdir", str(tmp_path), get_data("tests/wf/conflict.cwl")],
28 stdout=stream,
29 )
30 == 0
31 )
32
33 out = json.loads(stream.getvalue())
34 assert out["b1"]["basename"] == out["b2"]["basename"]
35 assert out["b1"]["location"] != out["b2"]["location"]