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
workflow
ewoksapps
est
Commits
5fe8bac1
Commit
5fe8bac1
authored
Jul 23, 2021
by
payno
Browse files
[ewoks][test] add missing condition if larch or pymca installed
parent
4e011ad4
Pipeline
#51178
passed with stages
in 9 minutes and 25 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
est/test/test_ewoks.py
View file @
5fe8bac1
...
@@ -37,6 +37,19 @@ import shutil
...
@@ -37,6 +37,19 @@ import shutil
import
os
import
os
import
xml.etree.ElementTree
as
ET
import
xml.etree.ElementTree
as
ET
try
:
import
PyMca5
except
ImportError
:
has_pymca
=
False
else
:
has_pymca
=
True
try
:
import
larch
except
ImportError
:
has_larch
=
False
else
:
has_larch
=
True
class
TestOrangeGraph
(
unittest
.
TestCase
):
class
TestOrangeGraph
(
unittest
.
TestCase
):
def
setUp
(
self
)
->
None
:
def
setUp
(
self
)
->
None
:
...
@@ -61,6 +74,7 @@ class TestOrangeGraph(unittest.TestCase):
...
@@ -61,6 +74,7 @@ class TestOrangeGraph(unittest.TestCase):
link_node
.
get
(
"source_channel_id"
),
link_node
.
get
(
"source_channel_id"
),
)
)
@
unittest
.
skipIf
(
has_pymca
is
False
,
"PyMca5 is not installed"
)
def
test_orange_graph_pymca
(
self
):
def
test_orange_graph_pymca
(
self
):
"""test conversion of a workflow based on pymca to ewoks graph
"""test conversion of a workflow based on pymca to ewoks graph
from orange to ewoks and from ewoks to orange"""
from orange to ewoks and from ewoks to orange"""
...
@@ -121,6 +135,7 @@ class TestOrangeGraph(unittest.TestCase):
...
@@ -121,6 +135,7 @@ class TestOrangeGraph(unittest.TestCase):
links_by_id
=
{
link
.
get
(
"id"
):
self
.
get_link_info
(
link
)
for
link
in
links
}
links_by_id
=
{
link
.
get
(
"id"
):
self
.
get_link_info
(
link
)
for
link
in
links
}
self
.
assertEqual
(
len
(
links_by_id
),
5
)
self
.
assertEqual
(
len
(
links_by_id
),
5
)
@
unittest
.
skipIf
(
has_larch
is
False
,
"xraylarch not installed"
)
def
test_orange_graph_larch
(
self
):
def
test_orange_graph_larch
(
self
):
"""test conversion of a workflow based on larch to ewoks graph
"""test conversion of a workflow based on larch to ewoks graph
from orange to ewoks and from ewoks to orange"""
from orange to ewoks and from ewoks to orange"""
...
...
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