Commit 15f367e9 authored by Wout De Nolf's avatar Wout De Nolf
Browse files

add ewoks tests

parent a0cb9588
Pipeline #64171 passed with stages
in 3 minutes and 1 second
......@@ -27,6 +27,6 @@ test:
- conda install --file demo/requirements-conda.txt
- conda install pytest
- python -m pip install git+https://github.com/woutdenolf/dahu.git@server_entry_point
- pip install .
- pip install --pre .[test]
- pytest --pyargs dahu
- pytest -v
import os
import pytest
from .. import plugins
@pytest.fixture(scope="session")
def register_plugins():
os.environ["DAHU_PLUGINS"] = plugins.__path__[0]
import pytest
from ewokscore.tests.examples.graphs import graph_names
from ewokscore.tests.examples.graphs import get_graph
from ewokscore.tests.utils.results import assert_execute_graph_all_tasks
from ewokscore import load_graph
@pytest.mark.parametrize("graph_name", graph_names())
def test_examples(graph_name, tmpdir, register_plugins):
from dahu import job # should be done after register_plugins
g, expected = get_graph(graph_name)
ewoksgraph = load_graph(g)
if ewoksgraph.is_cyclic or ewoksgraph.has_conditional_links:
binding = "ppf"
else:
binding = None
varinfo = {"root_uri": str(tmpdir)}
kwargs = {"graph": ewoksgraph.dump(), "binding": binding, "varinfo": varinfo}
j = job.Job("workflow.executegraph", kwargs)
j.start()
j.join(timeout=10)
print("Results:", j.output_data)
if not ewoksgraph.is_cyclic:
assert_execute_graph_all_tasks(ewoksgraph, expected, varinfo=varinfo)
......@@ -16,7 +16,8 @@ install_requires =
[options.extras_require]
test =
pytest
ewoks[test]
ewokscore[test]
ewoksppf[test]
dev =
%(test)s
black
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment