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

"planemo upload commit 6eee67778febed82ddd413c3ca40b3183a3898f1"
author guerler
date Fri, 31 Jul 2020 00:18:57 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/planemo/lib/python3.7/site-packages/cwltool/tests/test_procgenerator.py	Fri Jul 31 00:18:57 2020 -0400
@@ -0,0 +1,28 @@
+import pytest
+import os
+from .util import get_data, windows_needs_docker
+from cwltool.main import main
+
+@windows_needs_docker
+def test_missing_enable_ext():
+    # Requires --enable-ext and --enable-dev
+    try:
+        opt = os.environ.get("CWLTOOL_OPTIONS")
+
+        if "CWLTOOL_OPTIONS" in os.environ:
+            del os.environ["CWLTOOL_OPTIONS"]
+        assert main([get_data('tests/wf/generator/zing.cwl'),
+                     "--zing", "zipper"]) == 1
+
+        assert main(["--enable-ext", "--enable-dev",
+                     get_data('tests/wf/generator/zing.cwl'),
+                     "--zing", "zipper"]) == 0
+
+        os.environ["CWLTOOL_OPTIONS"] = "--enable-ext --enable-dev"
+        assert main([get_data('tests/wf/generator/zing.cwl'),
+                     "--zing", "zipper"]) == 0
+    finally:
+        if opt is not None:
+            os.environ["CWLTOOL_OPTIONS"] = opt
+        else:
+            del os.environ["CWLTOOL_OPTIONS"]