Trees | Indices | Help |
|
---|
|
1 # 2 # Project: The EDNA Kernel 3 # http://www.edna-site.org 4 # 5 # File: "$Id: EDTestCaseEDActionCluster.py 1472 2010-05-03 12:51:05Z svensson $" 6 # 7 # Copyright (C) 2008-2011 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 __author__ = "Olof Svensson" 29 __contact__ = "svensson@esrf.fr" 30 __license__ = "LGPLv3+" 31 __copyright__ = "European Synchrotron Radiation Facility, Grenoble, France" 32 33 import os 34 35 from EDAction import EDAction 36 from EDActionCluster import EDActionCluster 37 from EDAssert import EDAssert 38 from EDTestCase import EDTestCase 39 40 45 46 52 5355 """ 56 This is the test case for the plugin base class EDPlugin. 57 """ 5889 90 91 92 93 if __name__ == '__main__': 94 95 EDTestCaseEDActionCluster = EDTestCaseEDActionCluster("TestCase EDPluginExecProcessScript") 96 EDTestCaseEDActionCluster.execute() 9760 """ 61 Test the EDActionCluster with actions ending in success 62 """ 63 edActionCluster = EDActionCluster() 64 for i in range(10): 65 edAction = EDActionSuccess() 66 edActionCluster.addAction(edAction) 67 edActionCluster.executeSynchronous() 68 EDAssert.equal(False, edActionCluster.isFailure(), "EDActionCluster ended in success")69 7072 """ 73 Test the EDActionCluster with actions ending in success 74 """ 75 edActionCluster = EDActionCluster() 76 for i in range(10): 77 edAction = EDActionSuccess() 78 edActionCluster.addAction(edAction) 79 edActionFailure = EDActionFailure() 80 edActionCluster.addAction(edActionFailure) 81 edActionCluster.executeSynchronous() 82 EDAssert.equal(True, edActionCluster.isFailure(), "EDActionCluster ended in failure")83 84 8587 self.addTestMethod(self.testExecuteActionClusterWithSuccess) 88 self.addTestMethod(self.testExecuteActionClusterWithFailure)
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Jun 20 03:53:34 2014 | http://epydoc.sourceforge.net |