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,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 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):
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))
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