Skip to content
Snippets Groups Projects
Commit 4fc95304 authored by Harry Jeffery's avatar Harry Jeffery
Browse files

Refs #11355 Transfer projection columns test

parent 189d97f7
No related branches found
No related tags found
No related merge requests found
......@@ -189,6 +189,25 @@ public:
AnalysisDataService::Instance().remove(wsName);
}
void test_wrong_proj_format_columns() {
const std::string wsName = "__CutMDTest_wrong_proj_columns";
ITableWorkspace_sptr proj = WorkspaceFactory::Instance().createTable();
proj->addColumn("str", "name");
auto algCutMD = FrameworkManager::Instance().createAlgorithm("CutMD");
algCutMD->initialize();
algCutMD->setRethrows(true);
algCutMD->setProperty("InputWorkspace", sharedWSName);
algCutMD->setProperty("OutputWorkspace", wsName);
algCutMD->setProperty("Projection", proj);
algCutMD->setProperty("P1Bin", "0.1");
algCutMD->setProperty("P2Bin", "0.2");
algCutMD->setProperty("P3Bin", "0.1");
algCutMD->setProperty("CheckAxes", false);
TS_ASSERT_THROWS(algCutMD->execute(), std::runtime_error);
}
};
#endif /* MANTID_MDALGORITHMS_CUTMDTEST_H_ */
......@@ -21,12 +21,6 @@ class CutMDTest(unittest.TestCase):
def tearDown(self):
DeleteWorkspace(self.__in_md )
def test_wrong_projection_workspace_format_wrong_column_numbers(self):
projection = CreateEmptyTableWorkspace()
projection.addColumn("str", "name")
# missing other columns
self.assertRaises(RuntimeError, CutMD, InputWorkspace=self.__in_md, Projection=projection, OutputWorkspace="out_ws", P1Bin=[0.1], P2Bin=[0.1], P3Bin=[0.1], CheckAxes=False)
def test_wrong_table_workspace_format_wrong_row_numbers(self):
projection = CreateEmptyTableWorkspace()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment