Skip to content

Commit

Permalink
Validates file with SchemaDefRequirement
Browse files Browse the repository at this point in the history
refs bug #1473
  • Loading branch information
tetron committed Jul 21, 2021
1 parent 7094ede commit a5fdef3
Show file tree
Hide file tree
Showing 3 changed files with 1,467 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cwltool/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ def __init__(
sd, _ = self.get_requirement("SchemaDefRequirement")

if sd is not None:
sdtypes = cast(MutableSequence[CWLObjectType], sd["types"])
sdtypes = copy.deepcopy(cast(MutableSequence[CWLObjectType], sd["types"]))
avroize_type(cast(MutableSequence[CWLOutputType], sdtypes))
av = make_valid_avro(
sdtypes,
Expand Down
7 changes: 7 additions & 0 deletions tests/test_schemadef.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from cwltool.main import main
from .util import get_data


def test_schemadef() -> None:
exit_code = main(["--validate", get_data("tests/wf/schemadef-bug-1473.cwl")])
assert exit_code == 0
Loading

0 comments on commit a5fdef3

Please sign in to comment.