Package qm :: Package test :: Package web :: Module web :: Class StorageResultsStream
[hide private]
[frames] | no frames]

Class StorageResultsStream
source code

            object --+        
                     |        
   extension.Extension --+    
                         |    
result_stream.ResultStream --+
                             |
                            StorageResultsStream

A 'StorageResultsStream' stores results.

A 'StorageResultsStream' does not write any output. It simply stores the results for future display.

Nested Classes [hide private]

Inherited from extension.Extension: Type, __metaclass__


Instance Methods [hide private]
  __init__(self)
Construct a 'StorageResultsStream'.
  GetAnnotations(self)
Return the annotations for this run.
  WriteAnnotation(self, key, value)
Output an annotation for this run.
  WriteResult(self, result)
Output a test result.
  Summarize(self)
Output summary information about the results.
  Start(self, test_ids)
Start collecting results.
  IsFinished(self)
Return true iff no more results are forthcoming.
  GetTestResults(self)
Return the accumulated test results.
  GetTestResultsInOrder(self)
Return the test results in the order they appeared.
  GetResourceResults(self)
Return the accumulated resource results.
  GetResult(self, name)
Return the 'Result' with the indicated 'name'.

Inherited from result_stream.ResultStream: WriteAllAnnotations

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]

Inherited from result_stream.ResultStream: expected_outcomes, kind

Inherited from extension.Extension: arguments

Inherited from object: __class__


Method Details [hide private]

__init__(self)
(Constructor)

source code 
Construct a 'StorageResultsStream'.
Overrides: result_stream.ResultStream.__init__

GetAnnotations(self)

source code 
Return the annotations for this run.

WriteAnnotation(self, key, value)

source code 

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.
Overrides: result_stream.ResultStream.WriteAnnotation
(inherited documentation)

WriteResult(self, result)

source code 

Output a test result.

'result' -- A 'Result'.
Overrides: result_stream.ResultStream.WriteResult

Summarize(self)

source code 

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.
Overrides: result_stream.ResultStream.Summarize

Start(self, test_ids)

source code 

Start collecting results.

'test_ids' -- The names of the tests that we are about to run.

Start collecting new results. Discard results for the 'test_ids', but not for other tests.

IsFinished(self)

source code 

Return true iff no more results are forthcoming.

returns -- True if no more results will be written to this stream.

GetTestResults(self)

source code 

Return the accumulated test results.

returns -- A dictionary mapping test names to 'Result' objects.

GetTestResultsInOrder(self)

source code 

Return the test results in the order they appeared.

returns -- A sequence of test results, in the order that they appeared.

GetResourceResults(self)

source code 

Return the accumulated resource results.

returns -- A dictionary mapping resource names to 'Result' objects.

GetResult(self, name)

source code 

Return the 'Result' with the indicated 'name'.

'name' -- A string giving the name of a test or resource result.

returns -- The 'Result' instance corresponding to 'name'.