本文整理汇总了Python中mantid.api.AlgorithmManager.getAlgorithm方法的典型用法代码示例。如果您正苦于以下问题:Python AlgorithmManager.getAlgorithm方法的具体用法?Python AlgorithmManager.getAlgorithm怎么用?Python AlgorithmManager.getAlgorithm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mantid.api.AlgorithmManager
的用法示例。
在下文中一共展示了AlgorithmManager.getAlgorithm方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_removeById_removes_correct_instance
# 需要导入模块: from mantid.api import AlgorithmManager [as 别名]
# 或者: from mantid.api.AlgorithmManager import getAlgorithm [as 别名]
def test_removeById_removes_correct_instance(self):
alg = AlgorithmManager.create("ConvertUnits")
alg2 = AlgorithmManager.create("ConvertUnits")
AlgorithmManager.removeById(alg.getAlgorithmID())
self.assertEquals(None, AlgorithmManager.getAlgorithm(alg.getAlgorithmID()))
self.assertNotEqual(None, AlgorithmManager.getAlgorithm(alg2.getAlgorithmID()))
示例2: test_getAlgorithm_returns_correct_instance
# 需要导入模块: from mantid.api import AlgorithmManager [as 别名]
# 或者: from mantid.api.AlgorithmManager import getAlgorithm [as 别名]
def test_getAlgorithm_returns_correct_instance(self):
returned_instance = AlgorithmManager.create("ConvertUnits")
id = returned_instance.getAlgorithmID()
mgr_instance = AlgorithmManager.getAlgorithm(id)
self.assertEquals(id, mgr_instance.getAlgorithmID())