Fix bug with on_error links
___ test_workflow21[True-True-args1] ____
args = {'inputs': {'a': 0}, 'return_value': 2}, on_error = True, persist = True, ppf_log_config = None, tmpdir = local('/tmp/pytest-of-denolf/pytest-16/test_workflow21_True_True_args0')
@pytest.mark.parametrize(
"args",
[ARG_SUCCESS, ARG_FAILURE],
)
@pytest.mark.parametrize("on_error", [True, False])
@pytest.mark.parametrize("persist", [True, False])
def test_workflow21(args, on_error, persist, ppf_log_config, tmpdir):
"""Test conditions in output nodes"""
if persist:
varinfo = {"root_uri": str(tmpdir)}
else:
varinfo = None
graph = workflow21(on_error=on_error)
inputs = [{"name": k, "value": v} for k, v in args["inputs"].items()]
result1 = execute_graph(graph, inputs=inputs, varinfo=varinfo)
> assert result1
E assert None
ewoksppf/tests/test_ppf_workflow21.py:168: AssertionError
------------------------------------------------------------------------------------------------- Captured log call -------------------------------------------------------------------------------------------------
ERROR pypushflow:PythonActor.py:174 [submodel] [<EwoksPythonActor> submodel:gt] Error in python actor 'submodel:gt'!
Not running down stream actors ['Name mapper <submodel:gt - out1>']
Exception:
"""
Traceback (most recent call last):
File "/home/denolf/dev/ewokscore/ewokscore/task.py", line 283, in execute
self.run()
File "/home/denolf/dev/ewokscore/ewokscore/methodtask.py", line 18, in run
result = method(*args, **kwargs)
File "/home/denolf/dev/ewoksppf/ewoksppf/tests/test_ppf_workflow21.py", line 16, in raise_not_greater_than
assert a > LIMIT
AssertionError: assert 0 > 10
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/users/denolf/.pyenv/ubuntu_20_04/versions/3.8.5/lib/python3.8/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/home/denolf/dev/ewoksppf/ewoksppf/ppfrunscript.py", line 23, in run
task.execute()
File "/home/denolf/dev/ewokscore/ewokscore/task.py", line 289, in execute
raise RuntimeError(f"Task '{self.label}' failed") from e
RuntimeError: Task 'submodel:gt' failed
"""
Edited by Wout De Nolf