Home | Trees | Indices | Help |
---|
|
1 ######################################################################## 2 # 3 # File: expectation_database.py 4 # Author: Stefan Seefeld 5 # Date: 2006-11-05 6 # 7 # Contents: 8 # QMTest ExpectationDatabase class. 9 # 10 # Copyright (c) 2006 by CodeSourcery, Inc. All rights reserved. 11 # 12 # For license terms see the file COPYING. 13 # 14 ######################################################################## 15 16 ######################################################################## 17 # Imports 18 ######################################################################## 19 20 from qm.extension import Extension 21 from qm.fields import PythonField 22 from qm.test.result import Result 23 24 ######################################################################## 25 # Classes 26 ######################################################################## 2729 """An 'ExpectationDatabase' stores result expectations. 30 31 An 'ExpectationDatabase' provides a mechanism to store and make 32 accessible expectations for test outcomes. 33 By default, all tests are expected to pass. 34 """ 35 36 37 kind = 'expectation_database' 38 39 40 test_database = PythonField() 41 testrun_parameters = PythonField() 42 436245 """Look up the expected outcome for the given test. 46 47 'test_id' -- test-id for which the outcome is queried. 48 49 returns -- a Result object associated with this test_id.""" 50 51 return Result(Result.TEST, test_id)52 5355 """Return a dict object mapping test ids to expected outcomes.""" 56 57 outcomes = {} 58 if self.test_database: 59 for test_id in self.test_database.GetTestIds(): 60 outcomes[test_id] = self.Lookup(test_id).GetOutcome() 61 return outcomes
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Dec 23 12:30:47 2011 | http://epydoc.sourceforge.net |