Package qm :: Package test :: Module reader_test_run :: Class ReaderTestRun
[hide private]
[frames] | no frames]

Class ReaderTestRun
source code

      object --+    
               |    
test_run.TestRun --+
                   |
                  ReaderTestRun

A 'ReaderTestRun' reads its results using a 'ResultReader'.

A 'ResultReader' provides an iterative interface for reading results. A 'ReaderTestRun' uses a 'ResultReader' to populate a dictionary storing all the results from the reader.

Instance Methods [hide private]
  __init__(self, reader)
Create a new 'ReaderTestRun'
  GetResult(self, id, kind=Result.TEST)
Return the 'Result' for the indicated test.
  GetAnnotation(self, key)
Return the annotation associated with 'key'.
  GetAnnotations(self)
Return this run's dictionary of annotations.
  GetAllResults(self, directory="", kind=Result.TEST)
Return 'Result's from the given directory..

Inherited from test_run.TestRun: CountOutcomes, GetResultsByOutcome

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


Class Variables [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self, reader)
(Constructor)

source code 

Create a new 'ReaderTestRun'

'reader' -- The 'ResultReader' from which we are to read results.
Overrides: object.__init__

GetResult(self, id, kind=Result.TEST)

source code 

Return the 'Result' for the indicated test.

'id' -- The name of a test or resource.

'kind' -- The kind of result to retrieve. See 'Result' for a list of the available result kinds.

returns -- The 'Result' corresponding to 'test_id'.

raises -- 'KeyError' if there is no result of the given 'kind' for 'id' in the test run.
Overrides: test_run.TestRun.GetResult
(inherited documentation)

GetAnnotation(self, key)

source code 

Return the annotation associated with 'key'.

'key' -- A string giving the name of an annotation.

returns -- A string giving the value of the annotation, or 'None' if there is no such annotation.
Overrides: test_run.TestRun.GetAnnotation
(inherited documentation)

GetAnnotations(self)

source code 

Return this run's dictionary of annotations.

returns -- A dictionary mapping annotation names (strings) to values (also strings).
Overrides: test_run.TestRun.GetAnnotations
(inherited documentation)

GetAllResults(self, directory="", kind=Result.TEST)

source code 

Return 'Result's from the given directory..

'directory' -- A path to a directory in the test database.

'kind' -- The kind of results to return.

returns -- All the results within 'directory' (including its subdirectories).
Overrides: test_run.TestRun.GetAllResults
(inherited documentation)