File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 1313import cwl_utils .parser .cwl_v1_0 as parser
1414import cwl_utils .parser .cwl_v1_1 as parser1
1515import cwl_utils .parser .cwl_v1_2 as parser2
16+ from cwl_utils .cwl_expression_refactor import main as expression_refactor
1617from cwl_utils .cwl_v1_0_expression_refactor import traverse as traverse0
1718from cwl_utils .cwl_v1_1_expression_refactor import traverse as traverse1
1819from 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" )
227250def cwl_v1_0_dir (
228251 tmp_path_factory : TempPathFactory ,
You can’t perform that action at this time.
0 commit comments