Exemplo n.º 1
0
    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())
Exemplo n.º 2
0
    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())
Exemplo n.º 3
0
 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())
Exemplo n.º 4
0
    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())
Exemplo n.º 5
0
 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())
Exemplo n.º 6
0
 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())
Exemplo n.º 7
0
    def test_construction_with_name_produces_input_property(self):
        prop = AlgorithmProperty("TestProperty")

        self.assertEqual(Direction.Input, prop.direction)