Package qm :: Package test :: Module result_stream :: Class ResultStream
[show private | hide private]
[frames | no frames]

Type ResultStream

object --+    
         |    
 Extension --+
             |
            ResultStream

Known Subclasses:
FileResultStream, SQLResultStream

A 'ResultStream' displays test results.

A 'ResultStream' is responsible for displaying test results for the user as they arrive. It may also display summary information when the results are complete. The 'ResultStream' may also choose to write the results to a file for permanent storage.

'ResultStream' is an abstract class.
Method Summary
  __init__(self, **args)
Construct a new 'Extension'.
  Summarize(self)
Output summary information about the results.
  WriteAllAnnotations(self, annotations)
Output all annotations in 'annotations' to this stream.
  WriteAnnotation(self, key, value)
Output an annotation for this run.
  WriteResult(self, result)
Output a test result.
    Inherited from Extension
  __getattr__(self, name)
  GetClassName(self)
Return the name of the extension class.
  GetExplicitArguments(self)
Return the arguments to this extension instance.
  MakeDomDocument(self)
Create a DOM document for 'self'.
  MakeDomElement(self, document, element)
Create a DOM node for 'self'.
  Write(self, file)
Write an XML description of 'self' to a file.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
NoneType expected_outcomes = None                                                                  
str kind = 'result_stream'
    Inherited from Extension
list arguments = []

Method Details

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

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:
qm.extension.Extension.__init__ (inherited documentation)

Summarize(self)

Output summary information about the results.

When this method is called, the test run is complete. Summary information should be displayed for the user, if appropriate. Any finalization, such as the closing of open files, should also be performed at this point.

Derived class methods may override this method. They should, however, invoke this version before returning.

WriteAllAnnotations(self, annotations)

Output all annotations in 'annotations' to this stream.

Currently this is the same as making repeated calls to 'WriteAnnotation', but in the future, as special annotation types like timestamps are added, this will do the work of dispatching to functions like 'WriteTimestamp'.

Should not be overridden by subclasses.

WriteAnnotation(self, key, value)

Output an annotation for this run.

Subclasses should override this if they want to store/display annotations; the default implementation simply discards them.

'key' -- the key value as a string.

'value' -- the value of this annotation as a string.

WriteResult(self, result)

Output a test result.

Subclasses must override this method; the default implementation raises a 'NotImplementedError'.

'result' -- A 'Result'.

Class Variable Details

expected_outcomes

Type:
NoneType
Value:
None                                                                  

kind

Type:
str
Value:
'result_stream'                                                        

Generated by Epydoc 2.1 on Thu Sep 27 15:49:05 2007 http://epydoc.sf.net