Trees | Indices | Help |
|
---|
|
1 # coding: utf8 2 # 3 # Project: The EDNA Kernel 4 # http://www.edna-site.org 5 # 6 # File: "$Id$" 7 # 8 # Copyright (C) 2008-2009 European Synchrotron Radiation Facility 9 # Grenoble, France 10 # 11 # Principal authors: Olof Svensson (svensson@esrf.fr) 12 # Jérôme Kieffer (jerome.kieffer@esrf.fr) 13 # 14 # This program is free software: you can redistribute it and/or modify 15 # it under the terms of the GNU Lesser General Public License as published 16 # by the Free Software Foundation, either version 3 of the License, or 17 # (at your option) any later version. 18 # 19 # This program is distributed in the hope that it will be useful, 20 # but WITHOUT ANY WARRANTY; without even the implied warranty of 21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 # GNU Lesser General Public License for more details. 23 # 24 # You should have received a copy of the GNU General Public License 25 # and the GNU Lesser General Public License along with this program. 26 # If not, see <http://www.gnu.org/licenses/>. 27 # 28 29 # 30 # This class has been inspired by the corresponding AALib class 31 # (20090518-PyAALib-JyAALib-111) and modified according to the needs 32 # for the EDNA project. 33 # 34 35 from __future__ import with_statement 36 __authors__ = ["Olof Svensson", "Jérôme Kieffer"] 37 __contact__ = "svensson@esrf.eu" 38 __license__ = "LGPLv3+" 39 __copyright__ = "European Synchrotron Radiation Facility, Grenoble, France" 40 __date__ = "20120216" 41 __doc__ = """ 42 EDInformationTest: Information for the test cases. 43 """ 44 45 46 from EDObject import EDObject 4749 """ 50 Information for the test cases. 51 """12753 EDObject.__init__(self) 54 self.__strNameTest = _pyStrNameTest 55 self.__strException = None 56 self.__iNumberTest = _iNumberTest 57 self.__bSuccess = True 58 self.__listTest = [] 59 self.setTimeInit()60 6163 bSuccess = True 64 if (self.__bSuccess): 65 for edTest in self.__listTest: 66 if (not edTest.isSuccess()): 67 bSuccess = False 68 else: 69 bSuccess = False 70 return bSuccess71 72 75 76 79 80 84 85 88 89 92 9395 self.__listTest.append(_edInformationTest)96 97 101 102 105 106108 return len(self.__listTest)109 110112 fTime = self.getRunTime() 113 bSuccess = self.isSuccess() 114 with self.locked(): 115 strMessage = _strSpacing 116 if (bSuccess): 117 strMessage += "[SUCCESS]" 118 else: 119 strMessage += "[FAILURE]" 120 strMessage += " [ %d ][ %s ][ %.3f s ]\n" % (self.__iNumberTest, self.__strNameTest, fTime) 121 if ((not bSuccess) and (self.__strException is not None)): 122 strMessage += _strSpacing + " [Exception]: " + str(self.__strException) + "\n" 123 124 for edTest in self.__listTest: 125 strMessage += edTest.outputString(" ") 126 return strMessage
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Jun 20 03:53:32 2014 | http://epydoc.sourceforge.net |