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:

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'.
source code

Inherited from result_reader.ResultReader: GetAnnotations, GetResult, __iter__

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

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

Class Variables [hide private]
  arguments = [<<class 'qm.fields.TextField'> filename>, <<class...
A list of the arguments to the extension class.
  _is_binary_file = 0
If true, results are stored in a binary format.
  _argument_dictionary = {'file': <<class 'qm.fields.PythonField...
A map from argument names to 'Field' instances.
  _argument_list = [<<class 'qm.fields.PythonField'> file>, <<cl...
A list of all the 'Field's in this class.
  file = None
hash(x)
  filename = ''

Inherited from result_reader.ResultReader: kind

Properties [hide private]

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: object.__init__

Class Variable Details [hide private]

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>]

_is_binary_file

If true, results are stored in a binary format.

This flag can be overridden by derived classes.

Value:
0

_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>]