|
8 | 8 | import cwltool.process |
9 | 9 | from cwltool.main import main |
10 | 10 |
|
11 | | -from .util import get_data, needs_docker |
| 11 | +from .util import get_data, get_main_output, needs_docker |
12 | 12 |
|
13 | 13 |
|
14 | 14 | @needs_docker |
15 | 15 | def test_missing_enable_ext() -> None: |
16 | | - # Require that --enable-ext is provided. |
17 | | - assert main([get_data("tests/wf/listing_deep.cwl"), get_data("tests/listing-job.yml")]) != 0 |
| 16 | + """Require that --enable-ext is provided.""" |
| 17 | + error_code, _, _ = get_main_output( |
| 18 | + [get_data("tests/wf/listing_deep.cwl"), get_data("tests/listing-job.yml")] |
| 19 | + ) |
| 20 | + assert error_code != 0 |
18 | 21 |
|
19 | 22 |
|
20 | 23 | @needs_docker |
@@ -67,13 +70,6 @@ def test_listing_v1_0() -> None: |
67 | 70 | assert main([get_data("tests/wf/listing_v1_0.cwl"), get_data("tests/listing-job.yml")]) == 0 |
68 | 71 |
|
69 | 72 |
|
70 | | -@pytest.mark.skip(reason="This is not the default behaviour yet") |
71 | | -@needs_docker |
72 | | -def test_listing_v1_1() -> None: |
73 | | - # Default behavior in 1.1 will be no expansion |
74 | | - assert main([get_data("tests/wf/listing_v1_1.cwl"), get_data("tests/listing-job.yml")]) != 0 |
75 | | - |
76 | | - |
77 | 73 | @needs_docker |
78 | 74 | def test_double_overwrite(tmp_path: Path) -> None: |
79 | 75 | """Test that overwriting an input using cwltool:InplaceUpdateRequirement works.""" |
@@ -278,3 +274,14 @@ def test_warn_large_inputs() -> None: |
278 | 274 | ) |
279 | 275 | finally: |
280 | 276 | cwltool.process.FILE_COUNT_WARNING = was |
| 277 | + |
| 278 | + |
| 279 | +def test_ext_validation_no_namespace_warning() -> None: |
| 280 | + error_code, stdout, stderr = get_main_output( |
| 281 | + ["--validate", "--enable-ext", get_data("tests/wf/mpi_env.cwl")] |
| 282 | + ) |
| 283 | + assert error_code == 0 |
| 284 | + assert ( |
| 285 | + "URI prefix 'cwltool' of 'cwltool:loop' not recognized, are you " |
| 286 | + "missing a $namespaces section?" |
| 287 | + ) not in stderr |
0 commit comments