Commit fee52bfc authored by Gemma Guest's avatar Gemma Guest
Browse files

Add unit tests for kwargs of different types

parent e3e61527
......@@ -193,6 +193,26 @@ class AlgorithmTest(unittest.TestCase):
self.assertEqual("Wavelength", ws.getAxis(0).getUnit().unitID())
def test_createChildAlgorithm_with_bool_arg(self):
parent_alg = AlgorithmManager.createUnmanaged('Load')
child_alg = parent_alg.createChildAlgorithm("CreateSampleWorkspace", 0.0, 1.0, version=1,
enableLogging=False, Random=True)
self.assertTrue(child_alg.isChild())
child_alg.execute()
ws = child_alg.getProperty("OutputWorkspace").value
self.assertIsNotNone(ws)
def xtest_createChildAlgorithm_with_int_arg(self):
parent_alg = AlgorithmManager.createUnmanaged('Load')
child_alg = parent_alg.createChildAlgorithm("CreateSampleWorkspace", 0.0, 1.0, version=1,
enableLogging=False, NumEvents=1000)
self.assertTrue(child_alg.isChild())
child_alg.execute()
ws = child_alg.getProperty("OutputWorkspace").value
self.assertIsNotNone(ws)
if __name__ == '__main__':
unittest.main()
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