Skip to content
GitLab
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
Hide whitespace changes
Inline
Side-by-side
est/app/test/test_exec.py
View file @
5cdb91b2
...
...
@@ -66,26 +66,47 @@ class TestWorkflowFromOwsFile(unittest.TestCase):
def
tearDown
(
self
):
shutil
.
rmtree
(
self
.
outputdir
)
def
testExecWorkflow
(
self
):
def
test
Pymca
ExecWorkflow
(
self
):
"""Test regarding the instantiation of the pymcaXAS"""
for
workflow_file
in
(
self
.
pymca_orange_file
,
self
.
larch_orange_file
):
with
self
.
subTest
(
workflow_file
=
workflow_file
):
graph
=
ows_to_ewoks
(
filename
=
workflow_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
,
}
graph
.
execute
(
varinfo
=
varinfo
)
self
.
assertTrue
(
os
.
path
.
exists
(
self
.
output_file
))
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
,
}
graph
.
execute
(
varinfo
=
varinfo
)
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
.
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