Package qm :: Package test :: Package classes :: Module xml_expectation_database :: Class XMLExpectationDatabase
[hide private]
[frames] | no frames]

Class XMLExpectationDatabase
source code

                          object --+        
                                   |        
                 extension.Extension --+    
                                       |    
expectation_database.ExpectationDatabase --+
                                           |
                                          XMLExpectationDatabase

An 'XMLExpectationDatabase' reads expectations from an XML file.

Nested Classes [hide private]

Inherited from extension.Extension: Type, __metaclass__


Instance Methods [hide private]
  __init__(self, **args)
Construct a new 'Extension'.
  Lookup(self, test_id)
Look up the expected outcome for the given test.

Inherited from expectation_database.ExpectationDatabase: GetExpectedOutcomes

Inherited from extension.Extension: GetClassName, GetExplicitArguments, MakeDomDocument, MakeDomElement, Write, __getattr__

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__


Class Variables [hide private]
file_name  
_argument_dictionary A map from argument names to 'Field' instances.
_argument_list A list of all the 'Field's in this class.

Inherited from expectation_database.ExpectationDatabase: kind, test_database, testrun_parameters

Inherited from extension.Extension: arguments

Inherited from object: __class__


Method Details [hide private]

__init__(self, **args)
(Constructor)

source code 

Construct a new 'Extension'.

'args': Keyword arguments providing values for Extension parameters. The values should be appropriate for the corresponding fields. Derived classes must pass along any unrecognized keyword arguments to this method so that additional arguments can be added in the future without necessitating changes to derived classes.

This method will place all of the arguments into this objects instance dictionary.

Derived classes may override this method, but should call this method during their processing.
Overrides: extension.Extension.__init__
(inherited documentation)

Lookup(self, test_id)

source code 

Look up the expected outcome for the given test.

'test_id' -- test-id for which the outcome is queried.

returns -- a Result object associated with this test_id.
Overrides: expectation_database.ExpectationDatabase.Lookup
(inherited documentation)

Class Variable Details [hide private]

file_name

Value:
''                                                                     
      

_argument_dictionary

A map from argument names to 'Field' instances.

A map from the names of arguments for this class to the corresponding 'Field'.
Value:
{'file_name': <<class 'qm.fields.TextField'> file_name>,
 'test_database': <<class 'qm.fields.PythonField'> test_database>,
 'testrun_parameters': <<class 'qm.fields.PythonField'> testrun_parame\
ters>}                                                                 
      

_argument_list

A list of all the 'Field's in this class.

This list combines the complete list of 'arguments'. 'Field's appear in the order reached by a pre-order breadth-first traversal of the hierarchy, starting from the most derived class.
Value:
[<<class 'qm.fields.PythonField'> test_database>,
 <<class 'qm.fields.PythonField'> testrun_parameters>,
 <<class 'qm.fields.TextField'> file_name>]