Commit 5cdb91b2 authored by payno's avatar payno
Browse files

[test][test_exec] fix test of Larh workflow. z needs to be defined

parent b160cb78
...@@ -66,26 +66,47 @@ class TestWorkflowFromOwsFile(unittest.TestCase): ...@@ -66,26 +66,47 @@ class TestWorkflowFromOwsFile(unittest.TestCase):
def tearDown(self): def tearDown(self):
shutil.rmtree(self.outputdir) shutil.rmtree(self.outputdir)
def testExecWorkflow(self): def testPymcaExecWorkflow(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): input_information = InputInformation(
graph = ows_to_ewoks(filename=workflow_file) spectra_url=DataUrl(
input_information = InputInformation( file_path=self.data_input_file,
spectra_url=DataUrl( scheme="PyMca",
file_path=self.data_input_file, data_path="Column 1",
scheme="PyMca", ),
data_path="Column 1", channel_url=DataUrl(
), file_path=self.data_input_file,
channel_url=DataUrl( scheme="PyMca",
file_path=self.data_input_file, data_path="Column 2",
scheme="PyMca", ),
data_path="Column 2", )
), varinfo = {
) "input_information": input_information.to_dict(),
varinfo = { "output_file": self.output_file,
"input_information": input_information.to_dict(), }
"output_file": self.output_file, graph.execute(varinfo=varinfo)
} self.assertTrue(os.path.exists(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))
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