Package qm :: Package test :: Module run_database :: Class RunDatabase
[show private | hide private]
[frames | no frames]

Type RunDatabase

object --+    
         |    
 Extension --+
             |
            RunDatabase


A 'RunDatabase' stores 'TestRun's.

A 'RunDatabase' provides a mechanism for selecting 'TestRun's that meet particular criteria.
Method Summary
  GetAllRuns(self)
Return all the 'TestRun's in the database.
  GetAnnotations(self, key)
Return the set of annotations for 'key' from all test runs.
  GetOutcomes(self, id, kind)
Return an outcome dictionary for the indicated test.
  GetRunInTimeframe(self, key, value, time_key, minimum, maximum, is_iso_time)
Return a test run id matching the key and timeframe.
  GetRuns(self, predicate)
Return the set of 'TestRun's satisfying 'predicate'
  GetRunsByAnnotations(self, annotation_filter)
Return the 'TestRun's matching 'annotation_filter'.
  GetTimeframe(self, time_key, is_iso_time)
Return a pair of min / max values found for the given time_key across all test runs.
    Inherited from Extension
  __init__(self, **args)
Construct a new '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
    Inherited from Extension
list arguments = []
NoneType kind = None                                                                  

Method Details

GetAllRuns(self)

Return all the 'TestRun's in the database.

returns -- A sequence consisting of all of the 'TestRun's in the database.

GetAnnotations(self, key)

Return the set of annotations for 'key' from all test runs.

'key' -- A string used to look up the annotations.

returns -- A set of (distinct) annotations for 'key' from all test runs.

GetOutcomes(self, id, kind='test')

Return an outcome dictionary for the indicated test.

'id' -- The name of a test, suite, or resource item.

'kind' -- The kind of the item to retrieve the outcome for.

returns -- A dictionary indicating the number of outcomes per category.

GetRunInTimeframe(self, key, value, time_key, minimum, maximum, is_iso_time=True)

Return a test run id matching the key and timeframe.

GetRuns(self, predicate)

Return the set of 'TestRun's satisfying 'predicate'

'predicate' -- A callable that can be passed one 'TestRun' argument.

returns -- A sequence of 'TestRun's consisting only of those 'TestRun's in the database for which 'predicate' returns a true value.

GetRunsByAnnotations(self, annotation_filter)

Return the 'TestRun's matching 'annotation_filter'.

'annotation_filter' -- A dictionary mapping annotation keys (strings) to values (either strings or callables).

returns -- A sequence of 'TestRun's consisting only of those 'TestRun's in the database that match the 'annotation_filter'. A 'TestRun' matches the 'annotation_filter' if it matches each of the key-value pairs in the filter. If the value in such a pair is a string, then the annotation in the 'TestRun' must exactly match the value. If the value is a callable, rather than a string, then when passed the value from the 'TestRun', the predicate must return a true value.

GetTimeframe(self, time_key, is_iso_time=True)

Return a pair of min / max values found for the given time_key across all test runs.

'time_key' -- Annotation key referring to a string convertible to either iso-formatted time or floating point number.

returns -- minimum, maximum.

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