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
5cdb91b2
Commit
5cdb91b2
authored
Jul 22, 2021
by
payno
Browse files
[test][test_exec] fix test of Larh workflow. z needs to be defined
parent
b160cb78
Changes
1
Show whitespace changes
Inline
Side-by-side
est/app/test/test_exec.py
View file @
5cdb91b2
...
@@ -66,11 +66,9 @@ class TestWorkflowFromOwsFile(unittest.TestCase):
...
@@ -66,11 +66,9 @@ class TestWorkflowFromOwsFile(unittest.TestCase):
def
tearDown
(
self
):
def
tearDown
(
self
):
shutil
.
rmtree
(
self
.
outputdir
)
shutil
.
rmtree
(
self
.
outputdir
)
def
testExecWorkflow
(
self
):
def
test
Pymca
ExecWorkflow
(
self
):
"""Test regarding the instantiation of the pymcaXAS"""
"""Test regarding the instantiation of the pymcaXAS"""
for
workflow_file
in
(
self
.
pymca_orange_file
,
self
.
larch_orange_file
):
graph
=
ows_to_ewoks
(
filename
=
self
.
pymca_orange_file
)
with
self
.
subTest
(
workflow_file
=
workflow_file
):
graph
=
ows_to_ewoks
(
filename
=
workflow_file
)
input_information
=
InputInformation
(
input_information
=
InputInformation
(
spectra_url
=
DataUrl
(
spectra_url
=
DataUrl
(
file_path
=
self
.
data_input_file
,
file_path
=
self
.
data_input_file
,
...
@@ -89,3 +87,26 @@ class TestWorkflowFromOwsFile(unittest.TestCase):
...
@@ -89,3 +87,26 @@ class TestWorkflowFromOwsFile(unittest.TestCase):
}
}
graph
.
execute
(
varinfo
=
varinfo
)
graph
.
execute
(
varinfo
=
varinfo
)
self
.
assertTrue
(
os
.
path
.
exists
(
self
.
output_file
))
self
.
assertTrue
(
os
.
path
.
exists
(
self
.
output_file
))
def
testLarchExecWorkflow
(
self
):
"""Test regarding the instantiation of the pymcaXAS"""
graph
=
ows_to_ewoks
(
filename
=
self
.
pymca_orange_file
)
input_information
=
InputInformation
(
spectra_url
=
DataUrl
(
file_path
=
self
.
data_input_file
,
scheme
=
"PyMca"
,
data_path
=
"Column 1"
,
),
channel_url
=
DataUrl
(
file_path
=
self
.
data_input_file
,
scheme
=
"PyMca"
,
data_path
=
"Column 2"
,
),
)
varinfo
=
{
"input_information"
:
input_information
.
to_dict
(),
"output_file"
:
self
.
output_file
,
"mback"
:
{
"z"
:
29
},
}
graph
.
execute
(
varinfo
=
varinfo
)
self
.
assertTrue
(
os
.
path
.
exists
(
self
.
output_file
))
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