comparison env/lib/python3.9/site-packages/cwltool/tests/test_procgenerator.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 os
2
3 from cwltool.main import main
4
5 from .util import get_data, windows_needs_docker
6
7
8 @windows_needs_docker
9 def test_missing_enable_ext() -> None:
10 # Requires --enable-ext and --enable-dev
11 try:
12 opt = os.environ.get("CWLTOOL_OPTIONS")
13
14 if "CWLTOOL_OPTIONS" in os.environ:
15 del os.environ["CWLTOOL_OPTIONS"]
16 assert main([get_data("tests/wf/generator/zing.cwl"), "--zing", "zipper"]) == 1
17
18 assert (
19 main(
20 [
21 "--enable-ext",
22 "--enable-dev",
23 get_data("tests/wf/generator/zing.cwl"),
24 "--zing",
25 "zipper",
26 ]
27 )
28 == 0
29 )
30
31 os.environ["CWLTOOL_OPTIONS"] = "--enable-ext --enable-dev"
32 assert main([get_data("tests/wf/generator/zing.cwl"), "--zing", "zipper"]) == 0
33 finally:
34 if opt is not None:
35 os.environ["CWLTOOL_OPTIONS"] = opt
36 elif "CWLTOOL_OPTIONS" in os.environ:
37 del os.environ["CWLTOOL_OPTIONS"]