comparison planemo/lib/python3.7/site-packages/cwltool/tests/test_target.py @ 0:d30785e31577 draft

"planemo upload commit 6eee67778febed82ddd413c3ca40b3183a3898f1"
author guerler
date Fri, 31 Jul 2020 00:18:57 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:d30785e31577
1 from cwltool.main import main
2 from cwltool import load_tool
3
4 from .util import get_data, windows_needs_docker
5
6
7 @windows_needs_docker
8 def test_target():
9 """Test --target option successful."""
10 test_file = "tests/wf/scatter-wf4.cwl"
11 exit_code = main(['--target', 'out', get_data(test_file),
12 '--inp1', 'INP1', '--inp2', 'INP2'])
13 assert exit_code == 0
14
15
16 def test_wrong_target():
17 """Test --target option when value is wrong."""
18 test_file = "tests/wf/scatter-wf4.cwl"
19 exit_code = main(['--target', 'dummy_target',
20 get_data(test_file),
21 '--inp1', 'INP1', '--inp2', 'INP2'])
22 assert exit_code == 1
23
24
25 @windows_needs_docker
26 def test_target_packed():
27 """Test --target option with packed workflow schema."""
28 test_file = "tests/wf/scatter-wf4.json"
29 exit_code = main(['--target', 'out',
30 get_data(test_file),
31 '--inp1', 'INP1', '--inp2', 'INP2'])
32 assert exit_code == 0