Definition at line 858 of file BaseTest.py.
◆ __init__()
def GaudiTesting.BaseTest.BasicOutputValidator.__init__ |
( |
|
self, |
|
|
|
ref, |
|
|
|
cause, |
|
|
|
result_key |
|
) |
| |
Definition at line 859 of file BaseTest.py.
859 def __init__(self, ref, cause, result_key):
862 self.result_key = result_key
◆ __call__()
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 864 of file BaseTest.py.
864 def __call__(self, out, result):
865 """Validate the output of the program.
866 'stdout' -- A string containing the data written to the standard output
868 'stderr' -- A string containing the data written to the standard error
870 'result' -- A 'Result' object. It may be used to annotate
871 the outcome according to the content of stderr.
872 returns -- A list of strings giving causes of failure."""
876 if not self.__CompareText(out, self.ref):
877 causes.append(self.cause)
878 result[self.result_key] = result.Quote(self.ref)
◆ __CompareText()
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 882 of file BaseTest.py.
882 def __CompareText(self, s1, s2):
883 """Compare 's1' and 's2', ignoring line endings.
886 returns -- True if 's1' and 's2' are the same, ignoring
887 differences in line endings."""
891 to_ignore = re.compile(
892 r"Warning in <TInterpreter::ReadRootmapFile>: .* is already in .*"
896 return not to_ignore.match(l)
898 return list(filter(keep_line, s1.splitlines())) == list(
899 filter(keep_line, s2.splitlines())
902 return s1.splitlines() == s2.splitlines()
◆ cause
GaudiTesting.BaseTest.BasicOutputValidator.cause |
◆ ref
GaudiTesting.BaseTest.BasicOutputValidator.ref |
◆ result_key
GaudiTesting.BaseTest.BasicOutputValidator.result_key |
The documentation for this class was generated from the following file: