Trees | Indices | Help |
|
---|
|
1 # 2 # Project: The EDNA Kernel 3 # http://www.edna-site.org 4 # 5 # File: "$Id$" 6 # 7 # Copyright (C) 2008-2009 European Synchrotron Radiation Facility 8 # Grenoble, France 9 # 10 # Principal authors: Marie-Francoise Incardona (incardon@esrf.fr) 11 # Olof Svensson (svensson@esrf.fr) 12 # 13 # This program is free software: you can redistribute it and/or modify 14 # it under the terms of the GNU Lesser General Public License as published 15 # by the Free Software Foundation, either version 3 of the License, or 16 # (at your option) any later version. 17 # 18 # This program is distributed in the hope that it will be useful, 19 # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 # GNU Lesser General Public License for more details. 22 # 23 # You should have received a copy of the GNU General Public License 24 # and the GNU Lesser General Public License along with this program. 25 # If not, see <http://www.gnu.org/licenses/>. 26 # 27 28 __authors__ = [ "Marie-Francoise Incardona", "Olof Svensson" ] 29 __contact__ = "svensson@esrf.fr" 30 __license__ = "LGPLv3+" 31 __copyright__ = "European Synchrotron Radiation Facility, Grenoble, France" 32 33 from EDTestCase import EDTestCase 34 from EDAssert import EDAssert 35 from EDFactoryPlugin import EDFactoryPlugin 36 from EDUtilsPath import EDUtilsPath 3739 40 44 4594 95 96 97 98 if __name__ == '__main__': 99 100 edTestCaseEDFactoryPlugin = EDTestCaseEDFactoryPlugin("EDTestCaseEDFactoryPlugin") 101 edTestCaseEDFactoryPlugin.execute() 10247 edFactoryPlugin = EDFactoryPlugin() 48 strEdnaHome = EDUtilsPath.getEdnaHome() 49 strTestProjectRootDirectoryReference = EDUtilsPath.appendListOfPaths(strEdnaHome, [ "kernel", "tests", "data", "EDFactoryPlugin", "testProject" ]) 50 strTestProjectRootDirectory1 = edFactoryPlugin.getProjectRootDirectory("EDPluginTestPluginFactory") 51 EDAssert.equal(strTestProjectRootDirectoryReference, strTestProjectRootDirectory1) 52 strTestProjectRootDirectory2 = edFactoryPlugin.getProjectRootDirectory("XSDataTestProject") 53 EDAssert.equal(strTestProjectRootDirectoryReference, strTestProjectRootDirectory2) 54 strTestProjectRootDirectory3 = edFactoryPlugin.getProjectRootDirectory("PluginThatNotExists") 55 EDAssert.equal(None, strTestProjectRootDirectory3)56 5759 edFactoryPlugin = EDFactoryPlugin() 60 strProjectName = edFactoryPlugin.getProjectName("EDPluginTestPluginFactory") 61 EDAssert.equal("testProject", strProjectName)62 6365 edFactoryPlugin = EDFactoryPlugin() 66 edPluginTest = edFactoryPlugin.loadPlugin("EDPluginTestPluginFactory") 67 EDAssert.equal("TestReturnValue", edPluginTest.getTestValue())68 6971 edFactoryPlugin = EDFactoryPlugin() 72 edPluginTest = edFactoryPlugin.loadPlugin("EDPluginTestPluginFactory") 73 edFactoryPlugin.saveModuleDictionaryToDisk("testDictionary.xml")74 75 7678 edFactoryPlugin = EDFactoryPlugin() 79 edFactoryPlugin.loadModuleDictionaryFromDisk("testDictionary.xml")80 81 82 83 84 8587 """ 88 """ 89 self.addTestMethod(self.testGetProjectRootDirectory) 90 self.addTestMethod(self.testGetProjectName) 91 self.addTestMethod(self.testLoadPlugin) 92 self.addTestMethod(self.testSaveModuleDictionaryToDisk) 93 self.addTestMethod(self.testLoadModuleDictionaryFromDisk)
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Jun 20 03:53:35 2014 | http://epydoc.sourceforge.net |