Skip to content

Commit

Permalink
ArraySchema.items does need typeDSL after all
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed Sep 9, 2021
1 parent 8f9a9ef commit 36cf29d
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -1587,3 +1587,15 @@ def test_custom_type_in_step_process() -> None:
]
)
assert err_code == 0


@pytest.mark.parametrize("version", ["1_0", "1_1", "1_2"])
def test_array_items_typedsl(version: str) -> None:
"""Demonstrate that 'type: array, items: SomeType[]' works."""
err_code, _, stderr = get_main_output(
[
get_data(f"tests/wf/nested_typedsl_v{version}.cwl"),
get_data("tests/wf/nested_typedsl_job.yml"),
]
)
assert err_code == 0
5 changes: 5 additions & 0 deletions tests/wf/nested_typedsl_job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cat_in:
- - class: File
location: echo.cwl
- class: File
location: cat.cwl
14 changes: 14 additions & 0 deletions tests/wf/nested_typedsl_v1_0.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: CommandLineTool
baseCommand: cat
inputs:
cat_in:
type:
type: array
items: File[]
inputBinding: {}
stdout: all.txt
outputs:
txt:
type: stdout
14 changes: 14 additions & 0 deletions tests/wf/nested_typedsl_v1_1.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: CommandLineTool
baseCommand: cat
inputs:
cat_in:
type:
type: array
items: File[]
inputBinding: {}
stdout: all.txt
outputs:
txt:
type: stdout
14 changes: 14 additions & 0 deletions tests/wf/nested_typedsl_v1_2.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: CommandLineTool
baseCommand: cat
inputs:
cat_in:
type:
type: array
items: File[]
inputBinding: {}
stdout: all.txt
outputs:
txt:
type: stdout

0 comments on commit 36cf29d

Please sign in to comment.