Skip to content

Commit

Permalink
fix: restore commented test
Browse files Browse the repository at this point in the history
  • Loading branch information
philtweir committed Aug 25, 2024
1 parent 3e589ee commit 0c45e51
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions tests/test_cwl.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,38 +209,38 @@ def test_cwl_with_positional_parameter() -> None:
""")


#def test_cwl_without_default() -> None:
# """Check whether we can produce CWL without a default value.
#
# Uses a manually created parameter to avoid a default.
# """
# my_param = param("my_param", typ=int)
#
# result = increment(num=my_param)
# workflow = construct(result)
# rendered = render(workflow)["__root__"]
# hsh = hasher(("increment", ("num", "int|:param:my_param")))
#
# assert rendered == yaml.safe_load(f"""
# cwlVersion: 1.2
# class: Workflow
# inputs:
# my_param:
# label: my_param
# type: int
# outputs:
# out:
# label: out
# outputSource: increment-{hsh}/out
# type: int
# steps:
# increment-{hsh}:
# run: increment
# in:
# num:
# source: my_param
# out: [out]
# """)
def test_cwl_without_default() -> None:
"""Check whether we can produce CWL without a default value.
Uses a manually created parameter to avoid a default.
"""
my_param = param("my_param", typ=int)

result = increment(num=my_param)
workflow = construct(result)
rendered = render(workflow)["__root__"]
hsh = hasher(("increment", ("num", "int|:param:my_param")))

assert rendered == yaml.safe_load(f"""
cwlVersion: 1.2
class: Workflow
inputs:
my_param:
label: my_param
type: int
outputs:
out:
label: out
outputSource: increment-{hsh}/out
type: int
steps:
increment-{hsh}:
run: increment
in:
num:
source: my_param
out: [out]
""")


def test_cwl_with_subworkflow() -> None:
Expand Down

0 comments on commit 0c45e51

Please sign in to comment.