Skip to content

Commit

Permalink
more functional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed Aug 29, 2022
1 parent 02c0339 commit 2c38c41
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/test_etools_to_clt.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import cwl_utils.parser.cwl_v1_0 as parser
import cwl_utils.parser.cwl_v1_1 as parser1
import cwl_utils.parser.cwl_v1_2 as parser2
from cwl_utils.cwl_expression_refactor import main as expression_refactor
from cwl_utils.cwl_v1_0_expression_refactor import traverse as traverse0
from cwl_utils.cwl_v1_1_expression_refactor import traverse as traverse1
from cwl_utils.cwl_v1_2_expression_refactor import traverse as traverse2
Expand Down Expand Up @@ -223,6 +224,28 @@ def test_v1_2_workflow_output_pickvalue_expr() -> None:
)


def test_expression_refactor(tmp_path: Path) -> None:
"""Functional test."""
input_path = str(HERE / "../testdata/cond-wf-003.1.cwl")
result = expression_refactor([str(tmp_path), input_path])
assert result == 0


def test_expression_refactor_noop_solo(tmp_path: Path) -> None:
"""Functional test."""
input_path = str(HERE / "../testdata/dockstore-tool-md5sum.cwl")
result = expression_refactor([str(tmp_path), input_path])
assert result == 7


def test_expression_refactor_noop(tmp_path: Path) -> None:
"""Functional test."""
input_path1 = str(HERE / "../testdata/dockstore-tool-md5sum.cwl")
input_path2 = str(HERE / "../testdata/echo-tool-packed.cwl")
result = expression_refactor([str(tmp_path), input_path1, input_path2])
assert result == 0


@pytest.fixture(scope="session")
def cwl_v1_0_dir(
tmp_path_factory: TempPathFactory,
Expand Down

0 comments on commit 2c38c41

Please sign in to comment.