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

Class TestRun

source code

object --+
         |
        TestRun
Known Subclasses:

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]
 
GetResult(self, id, kind='test')
Return the 'Result' for the indicated test.
source code
 
GetAnnotation(self, key)
Return the annotation associated with 'key'.
source code
 
GetAnnotations(self)
Return this run's dictionary of annotations.
source code
 
GetAllResults(self, directory='', kind='test')
Return 'Result's from the given directory..
source code
 
GetResultsByOutcome(self, outcome=None, directory='', kind='test')
Return 'Result's with a particular outcome.
source code
 
CountOutcomes(self, directory='', outcome=None)
Return statistics about the outcomes of tests.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

GetResult(self, id, kind='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.

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

GetAllResults(self, directory='', kind='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).

GetResultsByOutcome(self, outcome=None, directory='', kind='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'.

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.