Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ classifiers = [
requires-python = ">=3.8"
dependencies = [
"ewokscore >=5.0.0",
"pypushflow >=2.1.0rc1",
"pypushflow >=2.1.0rc2",
]

[project.urls]
Expand Down
13 changes: 12 additions & 1 deletion src/ewoksppf/tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@
from ewokscore.tests.utils.results import assert_execute_graph_default_result


@pytest.mark.parametrize("graph_name", graph_names())
def _graph_name_param(name):
if name == "triangle1":
return pytest.param(
name,
marks=pytest.mark.filterwarnings(
"ignore:Merged workflow results.*are overwritten by actor.*:UserWarning"
),
)
return name


@pytest.mark.parametrize("graph_name", [_graph_name_param(n) for n in graph_names()])
@pytest.mark.parametrize("scheme", (None, "json"))
def test_execute_graph(engine, graph_name, scheme, ppf_log_config, tmpdir):
if graph_name == "self_trigger":
Expand Down
7 changes: 4 additions & 3 deletions src/ewoksppf/tests/test_ppf_workflow16.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ewokscore.tests.utils.results import assert_execute_graph_default_result
from ewokscore.tests.utils.results import filter_expected_results

from ewoksppf import execute_graph

Expand Down Expand Up @@ -136,5 +136,6 @@ def test_workflow16(ppf_log_config, tmpdir):
"""Test connecting nodes from sub-submodels to the top model"""
varinfo = {"root_uri": str(tmpdir)}
graph, expected = workflow16()
result = execute_graph(graph, varinfo=varinfo)
assert_execute_graph_default_result(graph, result, expected, varinfo=varinfo)
result = execute_graph(graph, varinfo=varinfo, merge_outputs=False)
expected = filter_expected_results(graph, expected, end_only=True)
assert result == expected
15 changes: 9 additions & 6 deletions src/ewoksppf/tests/test_ppf_workflow18.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest
from ewokscore.tests.utils.results import assert_execute_graph_default_result

from ewoksppf import execute_graph

Expand Down Expand Up @@ -38,10 +37,9 @@ def workflow18(dotask4=True):
"nodes": nodes,
}

expected_results = {"task3": {"_ppfdict": {"value": 2}}}
if dotask4:
expected_results = {"_ppfdict": {"value": 12}}
else:
expected_results = {"_ppfdict": {"value": 2}}
expected_results["task4"] = {"_ppfdict": {"value": 12}}

return graph, expected_results

Expand All @@ -51,5 +49,10 @@ def test_workflow18(dotask4, ppf_log_config, tmpdir):
"""Test conditional links"""
varinfo = {"root_uri": str(tmpdir)}
graph, expected = workflow18(dotask4=dotask4)
result = execute_graph(graph, varinfo=varinfo)
assert_execute_graph_default_result(graph, result, expected, varinfo=varinfo)
result = execute_graph(
graph,
varinfo=varinfo,
outputs=[{"id": "task3"}, {"id": "task4"}],
merge_outputs=False,
)
assert result == expected
10 changes: 9 additions & 1 deletion src/ewoksppf/tests/test_workflow_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
None,
[],
[{"all": False}],
[{"all": True}],
pytest.param(
[{"all": True}],
marks=pytest.mark.filterwarnings(
"ignore:Merged workflow results.*are overwritten by actor.*:UserWarning"
),
),
[{"id": "task5"}],
[{"label": "task5"}],
[{"id": "task1", "name": "inputs"}, {"id": "task4", "name": "result"}],
Expand Down Expand Up @@ -42,6 +47,9 @@ def test_default_outputs(ppf_log_config):
assert execute_graph(_create_graph()) == dict()


@pytest.mark.filterwarnings(
"ignore:Merged workflow results.*are overwritten by actor.*:UserWarning"
)
def test_all_outputs_merged(ppf_log_config):
"""'task6' is the last task with outputs so it takes precedence."""
result = execute_graph(_create_graph(), outputs=[{"all": True}])
Expand Down
Loading