|
Gaudi Framework, version v23r4 |
| Home | Generated: Mon Sep 17 2012 |
Output Validation Classes. More...
Public Member Functions | |
| def | __init__ |
| def | __call__ |
Public Attributes | |
| reference | |
| cause | |
| result_key | |
Private Member Functions | |
| def | __CompareText |
Output Validation Classes.
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 292 of file GaudiTest.py.
| def GaudiTest::BasicOutputValidator::__init__ | ( | self, | |
| ref, | |||
| cause, | |||
| result_key | |||
| ) |
Definition at line 297 of file GaudiTest.py.
| 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 302 of file GaudiTest.py.
00303 : 00304 """Validate the output of the program. 00305 00306 'stdout' -- A string containing the data written to the standard output 00307 stream. 00308 00309 'stderr' -- A string containing the data written to the standard error 00310 stream. 00311 00312 'result' -- A 'Result' object. It may be used to annotate 00313 the outcome according to the content of stderr. 00314 00315 returns -- A list of strings giving causes of failure.""" 00316 00317 causes = [] 00318 # Check to see if theoutput matches. 00319 if not self.__CompareText(out, self.reference): 00320 causes.append(self.cause) 00321 result[self.result_key] = result.Quote(self.reference) 00322 00323 return causes
| 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 324 of file GaudiTest.py.
00325 : 00326 """Compare 's1' and 's2', ignoring line endings. 00327 00328 's1' -- A string. 00329 00330 's2' -- A string. 00331 00332 returns -- True if 's1' and 's2' are the same, ignoring 00333 differences in line endings.""" 00334 00335 # The "splitlines" method works independently of the line ending 00336 # convention in use. 00337 return s1.splitlines() == s2.splitlines()
Definition at line 297 of file GaudiTest.py.
Definition at line 297 of file GaudiTest.py.
Definition at line 297 of file GaudiTest.py.