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


Python EDPlugin.getWorkingDirectory方法代码示例

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


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

示例1: testWriteDataOutput

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

示例2: testWriteDataInput

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

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


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