Mercurial > repos > shellac > guppy_basecaller
comparison env/lib/python3.7/site-packages/cwltool/tests/test_target.py @ 2:6af9afd405e9 draft
"planemo upload commit 0a63dd5f4d38a1f6944587f52a8cd79874177fc1"
| author | shellac |
|---|---|
| date | Thu, 14 May 2020 14:56:58 -0400 |
| parents | 26e78fe6e8c4 |
| children |
comparison
equal
deleted
inserted
replaced
| 1:75ca89e9b81c | 2:6af9afd405e9 |
|---|---|
| 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 |
