def test_value_method_returns_an_algorithm_type(self): prop = AlgorithmProperty("TestProperty") prop.valueAsStr = '{"name":"CreateWorkspace","paramters":{"OutputWorkspace":"ws","DataY":"1","DataX":"1","NSpec":"1"}}' alg = prop.value self.assertTrue(isinstance(alg,IAlgorithm)) self.assertEquals("CreateWorkspace",alg.name())
def test_value_method_returns_an_algorithm_type(self): prop = AlgorithmProperty("TestProperty") prop.valueAsStr = 'CreateWorkspace(OutputWorkspace="ws",DataY="1",DataX="1",NSpec=1' alg = prop.value self.assertTrue(isinstance(alg, IAlgorithm)) self.assertEquals("CreateWorkspace", alg.name())
def test_value_method_returns_an_algorithm_type(self): prop = AlgorithmProperty("TestProperty") prop.valueAsStr = 'CreateWorkspace(OutputWorkspace="ws",DataY="1",DataX="1",NSpec=1' alg = prop.value self.assertTrue(isinstance(alg,IAlgorithm)) self.assertEquals("CreateWorkspace",alg.name())
def test_value_method_returns_an_algorithm_type(self): # load plugins to register CreateWorkspace FrameworkManagerImpl.Instance() prop = AlgorithmProperty("TestProperty") prop.valueAsStr = '{"name": "CreateWorkspace",' \ '"parameters": {"OutputWorkspace": "ws", "DataY": "1", "DataX": "1","NSpec": "1"}}' alg = prop.value self.assertTrue(isinstance(alg, IAlgorithm)) self.assertEqual("CreateWorkspace", alg.name())
def test_construction_with_name_produces_input_property(self): prop = AlgorithmProperty("TestProperty") self.assertEqual(Direction.Input, prop.direction)