Package qm :: Package test :: Module file_result_reader :: Class FileResultReader
[hide private]
[frames] | no frames]

Class FileResultReader
source code

            object --+        
                     |        
   extension.Extension --+    
                         |    
result_reader.ResultReader --+
                             |
                            FileResultReader
Known Subclasses:
classes.dejagnu_stream.DejaGNUReader, classes.pickle_result_stream.PickleResultReader, classes.xml_result_stream.XMLResultReader

A 'FileResultReader' gets its input from a file.

A 'FileResultReader' is an abstract base class for other result reader classes that read results from a single file. The file from which results should be read can be specified using either the 'filename' argument or the 'file' argument. The latter is for use by QMTest internally.

Nested Classes [hide private]
InvalidFile An 'InvalidFile' exception indicates an incorrect file format.

Inherited from extension.Extension: Type, __metaclass__


Instance Methods [hide private]
  __init__(self, arguments=None, **args)
Construct a new 'FileResultReader'.

Inherited from result_reader.ResultReader: GetAnnotations, GetResult, __iter__

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]
_argument_dictionary A map from argument names to 'Field' instances.
_argument_list A list of all the 'Field's in this class.
_is_binary_file If true, results are stored in a binary format.
arguments A list of the arguments to the extension class.
file  
filename  

Inherited from result_reader.ResultReader: kind

Inherited from object: __class__


Method Details [hide private]

__init__(self, arguments=None, **args)
(Constructor)

source code 

Construct a new 'FileResultReader'.

'arguments' -- As for 'ResultReader'.

If the file provided is not in the input format expected by this result reader, the derived class '__init__' function must raise an 'InvalidStream' exception.
Overrides: result_reader.ResultReader.__init__

Class Variable Details [hide private]

_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': <<class 'qm.fields.PythonField'> file>,
 'filename': <<class 'qm.fields.TextField'> filename>}                 
      

_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'> file>,
 <<class 'qm.fields.TextField'> filename>]                             
      

_is_binary_file

If true, results are stored in a binary format.

This flag can be overridden by derived classes.
Value:
0                                                                     
      

arguments

A list of the arguments to the extension class.

Each element of this list should be an instance of 'Field'. The 'Field' instance describes the argument.

Derived classes may redefine this class variable. However, derived classes should not explicitly include the arguments from base classes; QMTest will automatically combine all the arguments found throughout the class hierarchy.
Value:
[<<class 'qm.fields.TextField'> filename>,
 <<class 'qm.fields.PythonField'> file>]                               
      

file

Value:
{}                                                                     
      

filename

Value:
''