Skip to content

Commit 29c2265

Browse files
committed
Add tests for long[] and float[]
1 parent 388d77a commit 29c2265

File tree

1 file changed

+36
-3
lines changed

1 file changed

+36
-3
lines changed

tests/test_toolargparse.py

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,34 @@
121121
cwlVersion: v1.0
122122
class: ExpressionTool
123123
124+
inputs:
125+
foo: long[]
126+
127+
expression: '{"bar": $(inputs.foo)}'
128+
129+
outputs: []
130+
"""
131+
132+
script_h = """
133+
#!/usr/bin/env cwl-runner
134+
135+
cwlVersion: v1.0
136+
class: ExpressionTool
137+
138+
inputs:
139+
foo: float[]
140+
141+
expression: '{"bar": $(inputs.foo)}'
142+
143+
outputs: []
144+
"""
145+
146+
script_i = """
147+
#!/usr/bin/env cwl-runner
148+
149+
cwlVersion: v1.0
150+
class: ExpressionTool
151+
124152
inputs:
125153
foo: double[]
126154
@@ -154,17 +182,22 @@
154182
lambda x: [x, "--foo", "1", "--foo", "2"],
155183
),
156184
(
157-
"foo with f for long value (large number)",
185+
"foo with g for long value (large number)",
158186
script_f,
159187
lambda x: [x, "--foo", str(2**31 + 10)],
160188
),
161189
(
162-
"foo with f for long value (small number)",
190+
"foo with g for long value (small number)",
163191
script_f,
164192
lambda x: [x, "--foo", str(-1 * (2**31) - 10)],
165193
),
166194
(
167-
"foo with g",
195+
"foo with h",
196+
script_g,
197+
lambda x: [x, "--foo", "1.2", "--foo", "3.4"],
198+
),
199+
(
200+
"foo with i",
168201
script_g,
169202
lambda x: [x, "--foo", "1.2", "--foo", "3.4"],
170203
),

0 commit comments

Comments
 (0)