Skip to content

Commit acd6a1b

Browse files
committed
Add tests
1 parent 7324015 commit acd6a1b

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

tests/test_toolargparse.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,34 @@
101101
outputs: []
102102
"""
103103

104+
script_f = """
105+
#!/usr/bin/env cwl-runner
106+
107+
cwlVersion: v1.0
108+
class: ExpressionTool
109+
110+
inputs:
111+
foo: int[]
112+
113+
expression: '{"bar": $(inputs.foo)}'
114+
115+
outputs: []
116+
"""
117+
118+
script_g = """
119+
#!/usr/bin/env cwl-runner
120+
121+
cwlVersion: v1.0
122+
class: ExpressionTool
123+
124+
inputs:
125+
foo: double[]
126+
127+
expression: '{"bar": $(inputs.foo)}'
128+
129+
outputs: []
130+
"""
131+
104132
scripts_argparse_params = [
105133
("help", script_a, lambda x: ["--debug", x, "--input", get_data("tests/echo.cwl")]),
106134
("boolean", script_b, lambda x: [x, "--help"]),
@@ -120,6 +148,16 @@
120148
script_e,
121149
lambda x: [x, "--foo", "http://example.com"],
122150
),
151+
(
152+
"foo with f",
153+
script_f,
154+
lambda x: [x, "--foo", "1", "--foo", "2"],
155+
),
156+
(
157+
"foo with g",
158+
script_g,
159+
lambda x: [x, "--foo", "1.2", "--foo", "3.4"],
160+
),
123161
]
124162

125163

0 commit comments

Comments
 (0)