当前位置: 首页>>代码示例>>Python>>正文


Python EDPlugin.configure方法代码示例

本文整理汇总了Python中EDPlugin.EDPlugin.configure方法的典型用法代码示例。如果您正苦于以下问题:Python EDPlugin.configure方法的具体用法?Python EDPlugin.configure怎么用?Python EDPlugin.configure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EDPlugin.EDPlugin的用法示例。


在下文中一共展示了EDPlugin.configure方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: testCreateBaseName

# 需要导入模块: from EDPlugin import EDPlugin [as 别名]
# 或者: from EDPlugin.EDPlugin import configure [as 别名]
 def testCreateBaseName(self):
     # Test 1 : naming of working directory
     edPlugin = EDPlugin()
     edPlugin.setBaseName("EDPlugin_testCreateBaseName")
     edPlugin.configure()
     strWorkingDir = edPlugin.getWorkingDirectory()
     EDAssert.equal(True, os.path.exists(strWorkingDir), "Test 1 : naming of working directory")
开发者ID:olofsvensson,项目名称:edna-kernel,代码行数:9,代码来源:EDTestCaseEDPlugin.py

示例2: configure

# 需要导入模块: from EDPlugin import EDPlugin [as 别名]
# 或者: from EDPlugin.EDPlugin import configure [as 别名]
 def configure(self):
     """
     Gets the EDPluginControl parameters from the configuration file and stores them in class member attributes.
     """
     EDPlugin.configure(self)
     EDVerbose.DEBUG("EDPluginControl.configure")
     strControlledPlugins = self.config.get("controlledPlugins", None)
     if (strControlledPlugins != None):
         pyListControlledPlugins = strControlledPlugins.split(",")
         for strControlledPlugin in pyListControlledPlugins:
             strControlledPluginName = self.getStringConfigurationParameterValue(strControlledPlugin)
             if strControlledPluginName != None:
                 self.setControlledPluginName(strControlledPlugin, strControlledPluginName)
                 EDVerbose.DEBUG("EDPluginControl.configure: setting controlled plugin %s to specific plugin %s" % (strControlledPlugin, strControlledPluginName))
     clusterSize = self.config.get("clusterSize", None)
     if (clusterSize != None):
         self.__iClusterSize = int(strClusterSize)
         EDVerbose.DEBUG("EDPluginControl.configure: setting cluster size to %d" % self.__iClusterSize)
开发者ID:antolinos,项目名称:edna,代码行数:20,代码来源:EDPluginControl.py

示例3: testWarningIfNoOutputData

# 需要导入模块: from EDPlugin import EDPlugin [as 别名]
# 或者: from EDPlugin.EDPlugin import configure [as 别名]
 def testWarningIfNoOutputData(self):
     # Test warning in case of no output data
     edPlugin = EDPlugin()
     edPlugin.configure()
     edPlugin.executeSynchronous()
     xsDataResultReference = XSDataResult()
     listOfWarningMessages = edPlugin.getListOfWarningMessages()
     EDAssert.equal(1, len(listOfWarningMessages), "Test warning in case of no output data, no warning messages = 1")
     EDAssert.equal(xsDataResultReference.marshal(), edPlugin.dataOutput.marshal(), "Test warning in case of no output data, default XSDataResult")
     # Test warning in case of named output data
     edPlugin = EDPlugin()
     edPlugin.configure()
     xsDataStringTest = XSDataString("Test1")
     edPlugin.setDataOutput(xsDataStringTest, "test") 
     edPlugin.executeSynchronous()
     xsDataResultReference = XSDataResult()
     listOfWarningMessages = edPlugin.getListOfWarningMessages()
     EDAssert.equal(0, len(listOfWarningMessages), "Test warning in case of named output data, no warning messages = 0")
开发者ID:olofsvensson,项目名称:edna-kernel,代码行数:20,代码来源:EDTestCaseEDPlugin.py

示例4: testWriteDataOutput

# 需要导入模块: from EDPlugin import EDPlugin [as 别名]
# 或者: from EDPlugin.EDPlugin import configure [as 别名]
 def testWriteDataOutput(self):
     # Test 1: default Output with XML
     edPlugin = EDPlugin()
     edPlugin.configure()
     xsDataStringTest = XSDataString("Test")
     edPlugin.setDataOutput(xsDataStringTest)
     edPlugin.writeDataOutput()
     EDAssert.equal(True, os.path.exists(os.path.join(edPlugin.getWorkingDirectory(), "_dataOutput.xml")), "Test 1: default Output with XML")
     # Test 2: named Output with XML
     edPlugin = EDPlugin()
     edPlugin.configure()
     xsDataStringTest = XSDataString("Test")
     edPlugin.setDataOutput(xsDataStringTest, "testData")
     edPlugin.writeDataOutput()
     EDAssert.equal(True, os.path.exists(os.path.join(edPlugin.getWorkingDirectory(), "_testData_0_dataOutput.xml")), "Test 2: named Output with XML")
     # Test 3: several Outputs with the same name, XML Output
     edPlugin = EDPlugin()
     edPlugin.configure()
     xsDataStringTest1 = XSDataString("Test1")
     xsDataStringTest2 = XSDataString("Test2")
     edPlugin.setDataOutput(xsDataStringTest1, "testData")
     edPlugin.setDataOutput(xsDataStringTest2, "testData")
     edPlugin.writeDataOutput()
     EDAssert.equal(True, os.path.exists(os.path.join(edPlugin.getWorkingDirectory(), "_testData_0_dataOutput.xml")), "Test 3: several Outputs with the same name, XML Output, 1")
     EDAssert.equal(True, os.path.exists(os.path.join(edPlugin.getWorkingDirectory(), "_testData_1_dataOutput.xml")), "Test 3: several Outputs with the same name, XML Output, 2")
开发者ID:olofsvensson,项目名称:edna-kernel,代码行数:27,代码来源:EDTestCaseEDPlugin.py

示例5: testWriteDataInput

# 需要导入模块: from EDPlugin import EDPlugin [as 别名]
# 或者: from EDPlugin.EDPlugin import configure [as 别名]
 def testWriteDataInput(self):
     # Test 1: default input with XML
     edPlugin = EDPlugin()
     edPlugin.configure()
     edPlugin.setXSDataInputClass(XSDataString)
     xsDataStringTest = XSDataString("Test")
     edPlugin.setDataInput(xsDataStringTest.marshal())
     edPlugin.writeDataInput()
     EDAssert.equal(True, os.path.exists(os.path.join(edPlugin.getWorkingDirectory(), "_dataInput.xml")), "Test 1: default input with XML")
     # Test 2: named input with XML
     edPlugin = EDPlugin()
     edPlugin.configure()
     edPlugin.setXSDataInputClass(XSDataString, "testData")
     xsDataStringTest = XSDataString("Test")
     edPlugin.setDataInput(xsDataStringTest.marshal(), "testData")
     edPlugin.writeDataInput()
     EDAssert.equal(True, os.path.exists(os.path.join(edPlugin.getWorkingDirectory(), "_testData_0_dataInput.xml")), "Test 2: named input with XML")
     # Test 3: several inputs with the same name, XML input
     edPlugin = EDPlugin()
     edPlugin.configure()
     edPlugin.setXSDataInputClass(XSDataString, "testData")
     xsDataStringTest1 = XSDataString("Test1")
     xsDataStringTest2 = XSDataString("Test2")
     edPlugin.setDataInput(xsDataStringTest1.marshal(), "testData")
     edPlugin.setDataInput(xsDataStringTest2.marshal(), "testData")
     edPlugin.writeDataInput()
     EDAssert.equal(True, os.path.exists(os.path.join(edPlugin.getWorkingDirectory(), "_testData_0_dataInput.xml")), "Test 3: several inputs with the same name, XML input, 1")
     EDAssert.equal(True, os.path.exists(os.path.join(edPlugin.getWorkingDirectory(), "_testData_1_dataInput.xml")), "Test 3: several inputs with the same name, XML input, 2")
开发者ID:olofsvensson,项目名称:edna-kernel,代码行数:30,代码来源:EDTestCaseEDPlugin.py

示例6: configure

# 需要导入模块: from EDPlugin import EDPlugin [as 别名]
# 或者: from EDPlugin.EDPlugin import configure [as 别名]
 def configure(self):
     """
     Gets the EDPluginControl parameters from the configuration file and stores them in class member attributes.
     """
     EDPlugin.configure(self)
     pluginConfiguration = self.getConfiguration()
     if(pluginConfiguration == None):
         EDVerbose.DEBUG("EDPluginControl.configure: pluginConfiguration is None, using default settings")
     else:
         EDVerbose.DEBUG("EDPluginControl.configure: pluginConfiguration found, using settings from there")
         strControlledPlugins = EDConfiguration.getStringParamValue(pluginConfiguration, "controlledPlugins")
         if (strControlledPlugins != None):
             pyListControlledPlugins = strControlledPlugins.split(",")
             for strControlledPlugin in pyListControlledPlugins:
                 strControlledPluginName = EDConfiguration.getStringParamValue(pluginConfiguration, strControlledPlugin)
                 if strControlledPluginName != None:
                     self.setControlledPluginName(strControlledPlugin, strControlledPluginName)
                     EDVerbose.DEBUG("EDPluginControl.configure: setting controlled plugin %s to specific plugin %s" % (strControlledPlugin, strControlledPluginName))
         strClusterSize = EDConfiguration.getStringParamValue(pluginConfiguration, "clusterSize")
         if (strClusterSize != None):
             self.__iClusterSize = int(strClusterSize)
             EDVerbose.DEBUG("EDPluginControl.configure: setting cluster size to %d" % self.__iClusterSize)
开发者ID:olofsvensson,项目名称:edna-kernel,代码行数:24,代码来源:EDPluginControl.py

示例7: testDataInputOutputProperties

# 需要导入模块: from EDPlugin import EDPlugin [as 别名]
# 或者: from EDPlugin.EDPlugin import configure [as 别名]
 def testDataInputOutputProperties(self):
     # Test dataInput property with XSDataObject
     edPlugin = EDPlugin()
     edPlugin.setXSDataInputClass(XSDataString)
     edPlugin.configure()
     xsDataStringTest = XSDataString("Test1")
     edPlugin.dataInput = xsDataStringTest
     EDAssert.equal(xsDataStringTest.marshal(), edPlugin.dataInput.marshal(), "Test dataInput property with XSDataObject")
     # Test dataInput property with XML
     edPlugin = EDPlugin()
     edPlugin.setXSDataInputClass(XSDataString)
     edPlugin.configure()
     xsDataStringTest = XSDataString("Test1")
     edPlugin.dataInput = xsDataStringTest.marshal()
     EDAssert.equal(xsDataStringTest.marshal(), edPlugin.dataInput.marshal(), "Test dataInput property with XML")
     # Test dataOutput property with XSDataObject
     edPlugin = EDPlugin()
     edPlugin.configure()
     xsDataStringTest = XSDataString("Test1")
     edPlugin.dataOutput = xsDataStringTest
     EDAssert.equal(xsDataStringTest.marshal(), edPlugin.dataOutput.marshal(), "Test dataOutput property with XSDataObject")
开发者ID:olofsvensson,项目名称:edna-kernel,代码行数:23,代码来源:EDTestCaseEDPlugin.py


注:本文中的EDPlugin.EDPlugin.configure方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。