comparison env/lib/python3.7/site-packages/cwltool/tests/test_target.py @ 0:26e78fe6e8c4 draft

"planemo upload commit c699937486c35866861690329de38ec1a5d9f783"
author shellac
date Sat, 02 May 2020 07:14:21 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:26e78fe6e8c4
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