Package qm :: Package test :: Module test_run :: Class TestRun
[hide private]
[frames] | no frames]

Class TestRun
source code

object --+
         |
        TestRun
Known Subclasses:
reader_test_run.ReaderTestRun

A 'TestRun' stores the 'Result's from a single test run.

The primary contents of a 'TestRun' are the the 'Result's of the run. In addition, each 'TestRun' has an associated set of annotations, which are used to store global information about the 'TestRun'.

Instance Methods [hide private]
  CountOutcomes(self, directory="", outcome=None)
Return statistics about the outcomes of tests.
  GetAllResults(self, directory="", kind=Result.TEST)
Return 'Result's from the given directory..
  GetAnnotation(self, key)
Return the annotation associated with 'key'.
  GetAnnotations(self)
Return this run's dictionary of annotations.
  GetResult(self, id, kind=Result.TEST)
Return the 'Result' for the indicated test.
  GetResultsByOutcome(self, outcome=None, directory="", kind=Result.TEST)
Return 'Result's with a particular outcome.

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


Class Variables [hide private]

Inherited from object: __class__


Method Details [hide private]

CountOutcomes(self, directory="", outcome=None)

source code 

Return statistics about the outcomes of tests.

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

'outcome' -- If not 'None', one of the 'Result.outcomes'.

returns -- A dictionary mapping outcomes to the number of test results with that outcome located within 'directory' and its subdirectories. If 'outcome' is not 'None', the dictionary will have an entry only for the 'outcome' specified.

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).

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.

GetAnnotations(self)

source code 

Return this run's dictionary of annotations.

returns -- A dictionary mapping annotation names (strings) to values (also strings).

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.

GetResultsByOutcome(self, outcome=None, directory="", kind=Result.TEST)

source code 

Return 'Result's with a particular outcome.

'outcome' -- One of the 'Result.outcomes', or 'None'.

'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) that have the indicated 'outcome', or, if 'outcome' is 'None', all test results from 'directory'.