Gaudi Framework, version v21r4

Home   Generated: 7 Sep 2009

GaudiTest::BasicOutputValidator Class Reference

List of all members.


Detailed Description

Basic implementation of an option validator for Gaudi tests.
This implementation is based on the standard (LCG) validation functions
used in QMTest.

Definition at line 264 of file GaudiTest.py.


Public Member Functions

def __init__
def __call__

Public Attributes

 reference
 cause
 result_key

Private Member Functions

def __CompareText

Member Function Documentation

def GaudiTest::BasicOutputValidator::__init__ (   self,
  ref,
  cause,
  result_key 
)

Definition at line 269 of file GaudiTest.py.

00269                                            :
00270         self.reference = ref
00271         self.cause = cause
00272         self.result_key = result_key
00273     
    def __call__(self, out, result):

def GaudiTest::BasicOutputValidator::__call__ (   self,
  out,
  result 
)

Validate the output of the program.

'stdout' -- A string containing the data written to the standard output
stream.

'stderr' -- A string containing the data written to the standard error
stream.

'result' -- A 'Result' object. It may be used to annotate
the outcome according to the content of stderr.

returns -- A list of strings giving causes of failure.

Definition at line 274 of file GaudiTest.py.

00274                                    :
00275         """Validate the output of the program.
00276 
00277         'stdout' -- A string containing the data written to the standard output
00278         stream.
00279 
00280         'stderr' -- A string containing the data written to the standard error
00281         stream.
00282 
00283         'result' -- A 'Result' object. It may be used to annotate
00284         the outcome according to the content of stderr.
00285 
00286         returns -- A list of strings giving causes of failure."""
00287 
00288         causes = []
00289         # Check to see if theoutput matches.
00290         if not self.__CompareText(out, self.reference):
00291             causes.append(self.cause) 
00292             result[self.result_key] = result.Quote(self.reference)
00293 
00294         return causes
00295     
    def __CompareText(self, s1, s2):

def GaudiTest::BasicOutputValidator::__CompareText (   self,
  s1,
  s2 
) [private]

Compare 's1' and 's2', ignoring line endings.

's1' -- A string.

's2' -- A string.

returns -- True if 's1' and 's2' are the same, ignoring
differences in line endings.

Definition at line 296 of file GaudiTest.py.

00296                                    :
00297         """Compare 's1' and 's2', ignoring line endings.
00298 
00299         's1' -- A string.
00300 
00301         's2' -- A string.
00302 
00303         returns -- True if 's1' and 's2' are the same, ignoring
00304         differences in line endings."""
00305 
00306         # The "splitlines" method works independently of the line ending
00307         # convention in use.
00308         return s1.splitlines() == s2.splitlines()
00309 
class FilePreprocessor:


Member Data Documentation

Definition at line 270 of file GaudiTest.py.

Definition at line 271 of file GaudiTest.py.

Definition at line 272 of file GaudiTest.py.


The documentation for this class was generated from the following file:

Generated at Mon Sep 7 18:26:43 2009 for Gaudi Framework, version v21r4 by Doxygen version 1.5.6 written by Dimitri van Heesch, © 1997-2004