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


Python EDPlugin.setXSDataInputClass方法代码示例

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


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

示例1: testDataInputOutputProperties

# 需要导入模块: from EDPlugin import EDPlugin [as 别名]
# 或者: from EDPlugin.EDPlugin import setXSDataInputClass [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

示例2: testWriteDataInput

# 需要导入模块: from EDPlugin import EDPlugin [as 别名]
# 或者: from EDPlugin.EDPlugin import setXSDataInputClass [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

示例3: testSetDataInput

# 需要导入模块: from EDPlugin import EDPlugin [as 别名]
# 或者: from EDPlugin.EDPlugin import setXSDataInputClass [as 别名]
 def testSetDataInput(self):
     """
     Test the setDataInput method with different inputs
     """
     # Test 1: default input with XML
     edPlugin = EDPlugin()
     edPlugin.setXSDataInputClass(XSDataString)
     xsDataStringTest = XSDataString("Test")
     edPlugin.setDataInput(xsDataStringTest.marshal())
     EDAssert.equal(xsDataStringTest.marshal(), edPlugin.getDataInput().marshal(), "Test 1: default input with XML")
     # Test 2: default input with object
     edPlugin = EDPlugin()
     edPlugin.setXSDataInputClass(XSDataString)
     xsDataStringTest = XSDataString("Test")
     edPlugin.setDataInput(xsDataStringTest)
     EDAssert.equal(xsDataStringTest.marshal(), edPlugin.getDataInput().marshal(), "Test 2: default input with object")
     # Test 3: named input with XML
     edPlugin = EDPlugin()
     edPlugin.setXSDataInputClass(XSDataString, "testData")
     xsDataStringTest = XSDataString("Test")
     edPlugin.setDataInput(xsDataStringTest.marshal(), "testData")
     EDAssert.equal(xsDataStringTest.marshal(), edPlugin.getDataInput("testData")[0].marshal(), "Test 3: named input with XML")
     # Test 4: named input with object
     edPlugin = EDPlugin()
     edPlugin.setXSDataInputClass(XSDataString, "testData")
     xsDataStringTest = XSDataString("Test")
     edPlugin.setDataInput(xsDataStringTest, "testData")
     EDAssert.equal(xsDataStringTest.marshal(), edPlugin.getDataInput("testData")[0].marshal(), "Test 4: named input with object")
     # Test 4: several inputs with the same name, XML input
     edPlugin = EDPlugin()
     edPlugin.setXSDataInputClass(XSDataString, "testData")
     xsDataStringTest1 = XSDataString("Test1")
     xsDataStringTest2 = XSDataString("Test2")
     edPlugin.setDataInput(xsDataStringTest1.marshal(), "testData")
     edPlugin.setDataInput(xsDataStringTest2.marshal(), "testData")
     pyListDataInput = edPlugin.getDataInput("testData")
     EDAssert.equal(xsDataStringTest1.marshal(), pyListDataInput[0].marshal(), "Test 4: several inputs with the same name, XML input, 1")
     EDAssert.equal(xsDataStringTest2.marshal(), pyListDataInput[1].marshal(), "Test 4: several inputs with the same name, XML input, 2")
     # Test 5: several inputs with the same name, object input
     edPlugin = EDPlugin()
     edPlugin.setXSDataInputClass(XSDataString, "testData")
     xsDataStringTest1 = XSDataString("Test1")
     xsDataStringTest2 = XSDataString("Test2")
     edPlugin.setDataInput(xsDataStringTest1, "testData")
     edPlugin.setDataInput(xsDataStringTest2, "testData")
     pyListDataInput = edPlugin.getDataInput("testData")
     EDAssert.equal(xsDataStringTest1.marshal(), pyListDataInput[0].marshal(), "Test 5: several inputs with the same name, object input, 1")
     EDAssert.equal(xsDataStringTest2.marshal(), pyListDataInput[1].marshal(), "Test 5: several inputs with the same name, object input, 2")
     # Test 6: test of delDataInput
     edPlugin = EDPlugin()
     edPlugin.setXSDataInputClass(XSDataString)
     xsDataStringTest = XSDataString("Test")
     edPlugin.setDataInput(xsDataStringTest.marshal())
     edPlugin.delDataInput()
     EDAssert.equal(None, edPlugin.getDataInput(), "Test 6: test of delDataInput")
开发者ID:olofsvensson,项目名称:edna-kernel,代码行数:57,代码来源:EDTestCaseEDPlugin.py


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