Skip to content

Commit 0c3ca6e

Browse files
committed
more functional tests
1 parent 95305ba commit 0c3ca6e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/test_etools_to_clt.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import cwl_utils.parser.cwl_v1_0 as parser
1414
import cwl_utils.parser.cwl_v1_1 as parser1
1515
import cwl_utils.parser.cwl_v1_2 as parser2
16+
from cwl_utils.cwl_expression_refactor import main as expression_refactor
1617
from cwl_utils.cwl_v1_0_expression_refactor import traverse as traverse0
1718
from cwl_utils.cwl_v1_1_expression_refactor import traverse as traverse1
1819
from cwl_utils.cwl_v1_2_expression_refactor import traverse as traverse2
@@ -223,6 +224,28 @@ def test_v1_2_workflow_output_pickvalue_expr() -> None:
223224
)
224225

225226

227+
def test_expression_refactor(tmp_path: Path) -> None:
228+
"""Functional test."""
229+
input_path = str(HERE / "../testdata/cond-wf-003.1.cwl")
230+
result = expression_refactor([str(tmp_path), input_path])
231+
assert result == 0
232+
233+
234+
def test_expression_refactor_noop_solo(tmp_path: Path) -> None:
235+
"""Functional test."""
236+
input_path = str(HERE / "../testdata/dockstore-tool-md5sum.cwl")
237+
result = expression_refactor([str(tmp_path), input_path])
238+
assert result == 7
239+
240+
241+
def test_expression_refactor_noop(tmp_path: Path) -> None:
242+
"""Functional test."""
243+
input_path1 = str(HERE / "../testdata/dockstore-tool-md5sum.cwl")
244+
input_path2 = str(HERE / "../testdata/echo-tool-packed.cwl")
245+
result = expression_refactor([str(tmp_path), input_path1, input_path2])
246+
assert result == 0
247+
248+
226249
@pytest.fixture(scope="session")
227250
def cwl_v1_0_dir(
228251
tmp_path_factory: TempPathFactory,

0 commit comments

Comments
 (0)