Module EDTestCasePluginExecuteTestPlugin
[hide private]
[frames] | no frames]

Source Code for Module EDTestCasePluginExecuteTestPlugin

 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:      Olof Svensson (svensson@esrf.fr)  
11  # 
12  #    This program is free software: you can redistribute it and/or modify 
13  #    it under the terms of the GNU Lesser General Public License as published 
14  #    by the Free Software Foundation, either version 3 of the License, or 
15  #    (at your option) any later version. 
16  # 
17  #    This program is distributed in the hope that it will be useful, 
18  #    but WITHOUT ANY WARRANTY; without even the implied warranty of 
19  #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
20  #    GNU Lesser General Public License for more details. 
21  # 
22  #    You should have received a copy of the GNU General Public License 
23  #    and the GNU Lesser General Public License  along with this program.   
24  #    If not, see <http://www.gnu.org/licenses/>. 
25  # 
26   
27  __author__ = ["Olof Svensson"] 
28  __contact__ = "svensson@esrf.fr" 
29  __license__ = "LGPLv3+" 
30  __copyright__ = "European Synchrotron Radiation Facility, Grenoble, France" 
31   
32   
33  import os 
34   
35  from EDTestCasePluginExecute             import EDTestCasePluginExecute 
36  from EDUtilsTest                         import EDUtilsTest 
37  from EDUtilsPath                         import EDUtilsPath 
38   
39   
40   
41   
42 -class EDTestCasePluginExecuteTestPlugin(EDTestCasePluginExecute):
43 """ 44 """ 45
46 - def __init__(self):
47 """ 48 """ 49 EDTestCasePluginExecute.__init__(self, "EDPluginTestPluginFactory") 50 strModuleLocation = EDUtilsTest.getFactoryPluginTest().getModuleLocation("EDPluginTestPluginFactory") 51 strRootDirectory = EDUtilsPath.appendListOfPaths(strModuleLocation, [ "..", "tests", "data" ]) 52 # Default input 53 self.setDataInputFile(os.path.join(strRootDirectory, "XSDataInputString_reference.xml")) 54 self.setReferenceDataOutputFile(os.path.join(strRootDirectory, "XSDataResultString_reference.xml")) 55 # Named input 56 self.setDataInputFile(os.path.join(strRootDirectory, "XSDataInputString_reference.xml"), "value1") 57 self.setReferenceDataOutputFile(os.path.join(strRootDirectory, "XSDataResultString_reference.xml"), "value1") 58 # List input 59 self.setDataInputFile(os.path.join(strRootDirectory, "XSDataInputString_reference.xml"), "value2") 60 self.setDataInputFile(os.path.join(strRootDirectory, "XSDataInputString_reference.xml"), "value2") 61 self.setDataInputFile(os.path.join(strRootDirectory, "XSDataInputString_reference.xml"), "value2") 62 self.setReferenceDataOutputFile(os.path.join(strRootDirectory, "XSDataResultString_reference.xml"), "value2") 63 self.setReferenceDataOutputFile(os.path.join(strRootDirectory, "XSDataResultString_reference.xml"), "value2") 64 self.setReferenceDataOutputFile(os.path.join(strRootDirectory, "XSDataResultString_reference.xml"), "value2")
65 66 67 68
69 - def testExecute(self):
70 self.run()
71 72 73 74 75
76 - def process(self):
77 self.addTestMethod(self.testExecute)
78 79 80 81 if __name__ == '__main__': 82 83 edTestCasePluginExecuteTestPlugin = EDTestCasePluginExecuteTestPlugin("EDTestCasePluginExecuteTestPlugin") 84 edTestCasePluginExecuteTestPlugin.execute() 85