Skip to content

Commit 8eb7ed8

Browse files
committed
loops: add validation test
1 parent b7a6610 commit 8eb7ed8

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/test_loop.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
"""Test the prototype loop extension."""
2+
3+
from cwltool.main import main
4+
from .util import get_data
5+
6+
7+
def test_validate_loop() -> None:
8+
"""Affirm that the sample loop workflow validates with --enable-ext."""
9+
params = [
10+
"--enable-ext",
11+
"--validate",
12+
get_data("tests/loop.cwl"),
13+
]
14+
assert main(params) == 0
15+
16+
17+
def test_validate_loop_fail_no_ext() -> None:
18+
"""Affirm that the sample loop workflow does not validate when --enable-ext is missing."""
19+
params = [
20+
"--validate",
21+
get_data("tests/loop.cwl"),
22+
]
23+
assert main(params) == 1

0 commit comments

Comments
 (0)