| The Gaudi Framework v30r0 (c919700c)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | Private Member Functions | List of all members
GaudiTesting.BaseTest.BasicOutputValidator Class Reference

## Public Member Functions
def | __init__ (self, ref, cause, result_key)
def | __call__ (self, out, result)

## Public Attributes
| ref
| cause
| result_key

## Private Member Functions
def | __CompareText (self, s1, s2)

## Detailed Description

Definition at line 641 of file BaseTest.py.

## Constructor & Destructor Documentation

def GaudiTesting.BaseTest.BasicOutputValidator.__init__ | ( |  | self,
|  |  | ref,
|  |  | cause,
|  |  | result_key
| ) |  |

Definition at line 643 of file BaseTest.py.

643 def __init__(self, ref, cause, result_key):
644 self.ref = ref
645 self.cause = cause
646 self.result_key = result_key
647
GaudiTesting.BaseTest.BasicOutputValidator.ref
ref
Definition: BaseTest.py:644
GaudiTesting.BaseTest.BasicOutputValidator.cause
cause
Definition: BaseTest.py:645
GaudiTesting.BaseTest.BasicOutputValidator.result_key
result_key
Definition: BaseTest.py:646
GaudiTesting.BaseTest.BasicOutputValidator.__init__
def __init__(self, ref, cause, result_key)
Definition: BaseTest.py:643

## Member Function Documentation

def GaudiTesting.BaseTest.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 648 of file BaseTest.py.

648 def __call__(self, out, result):
649 """Validate the output of the program.
650 'stdout' -- A string containing the data written to the standard output
651 stream.
652 'stderr' -- A string containing the data written to the standard error
653 stream.
654 'result' -- A 'Result' object. It may be used to annotate
655 the outcome according to the content of stderr.
656 returns -- A list of strings giving causes of failure."""
657
658 causes = []
659 # Check the output
660 if not self.__CompareText(out, self.ref):
661 causes.append(self.cause)
662 result[self.result_key] = result.Quote(self.ref)
663
664 return causes
665
GaudiTesting.BaseTest.BasicOutputValidator.ref
ref
Definition: BaseTest.py:644
GaudiTesting.BaseTest.BasicOutputValidator.__call__
def __call__(self, out, result)
Definition: BaseTest.py:648
GaudiTesting.BaseTest.BasicOutputValidator.cause
cause
Definition: BaseTest.py:645
GaudiTesting.BaseTest.BasicOutputValidator.result_key
result_key
Definition: BaseTest.py:646
GaudiTesting.BaseTest.BasicOutputValidator.__CompareText
def __CompareText(self, s1, s2)
Definition: BaseTest.py:666

def GaudiTesting.BaseTest.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 666 of file BaseTest.py.

666 def __CompareText(self, s1, s2):
667 """Compare 's1' and 's2', ignoring line endings.
668 's1' -- A string.
669 's2' -- A string.
670 returns -- True if 's1' and 's2' are the same, ignoring
671 differences in line endings."""
672 if ROOT6WorkAroundEnabled('ReadRootmapCheck'):
673 # FIXME: (MCl) Hide warnings from new rootmap sanity check until we
674 # can fix them
675 to_ignore = re.compile(
676 r'Warning in <TInterpreter::ReadRootmapFile>: .* is already in .*')
677
678 def keep_line(l): return not to_ignore.match(l)
679 return filter(keep_line, s1.splitlines()) == filter(keep_line, s2.splitlines())
680 else:
681 return s1.splitlines() == s2.splitlines()
682
683
684 # ------------------------ Preprocessor elements ------------------------#
GaudiTesting.BaseTest.BasicOutputValidator.__CompareText
def __CompareText(self, s1, s2)
Definition: BaseTest.py:666
GaudiTesting.BaseTest.ROOT6WorkAroundEnabled
def ROOT6WorkAroundEnabled(id=None)
Definition: BaseTest.py:554

## Member Data Documentation

GaudiTesting.BaseTest.BasicOutputValidator.cause

Definition at line 645 of file BaseTest.py.

GaudiTesting.BaseTest.BasicOutputValidator.ref

Definition at line 644 of file BaseTest.py.

GaudiTesting.BaseTest.BasicOutputValidator.result_key

Definition at line 646 of file BaseTest.py.

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

- GaudiPolicy/python/GaudiTesting/BaseTest.py