Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Wout De Nolf
dahu-demo
Commits
15f367e9
Commit
15f367e9
authored
Jan 14, 2022
by
Wout De Nolf
Browse files
add ewoks tests
parent
a0cb9588
Pipeline
#64171
passed with stages
in 3 minutes and 1 second
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
15f367e9
...
...
@@ -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
dahu_demo/tests/conftest.py
0 → 100644
View file @
15f367e9
import
os
import
pytest
from
..
import
plugins
@
pytest
.
fixture
(
scope
=
"session"
)
def
register_plugins
():
os
.
environ
[
"DAHU_PLUGINS"
]
=
plugins
.
__path__
[
0
]
dahu_demo/tests/test_ewoks.py
0 → 100644
View file @
15f367e9
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
)
setup.cfg
View file @
15f367e9
...
...
@@ -16,7 +16,8 @@ install_requires =
[options.extras_require]
test =
pytest
ewoks[test]
ewokscore[test]
ewoksppf[test]
dev =
%(test)s
black
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment