comparison env/lib/python3.9/site-packages/cwltool/tests/test_target.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 from cwltool.main import main
2
3 from .util import get_data, windows_needs_docker
4
5
6 @windows_needs_docker
7 def test_target() -> None:
8 """Test --target option successful."""
9 test_file = "tests/wf/scatter-wf4.cwl"
10 exit_code = main(
11 ["--target", "out", get_data(test_file), "--inp1", "INP1", "--inp2", "INP2"]
12 )
13 assert exit_code == 0
14
15
16 def test_wrong_target() -> None:
17 """Test --target option when value is wrong."""
18 test_file = "tests/wf/scatter-wf4.cwl"
19 exit_code = main(
20 [
21 "--target",
22 "dummy_target",
23 get_data(test_file),
24 "--inp1",
25 "INP1",
26 "--inp2",
27 "INP2",
28 ]
29 )
30 assert exit_code == 1
31
32
33 @windows_needs_docker
34 def test_target_packed() -> None:
35 """Test --target option with packed workflow schema."""
36 test_file = "tests/wf/scatter-wf4.json"
37 exit_code = main(
38 ["--target", "out", get_data(test_file), "--inp1", "INP1", "--inp2", "INP2"]
39 )
40 assert exit_code == 0