Home | Trees | Indices | Help |
---|
|
An 'ItemDescriptor' describes a test, resource, or similar entity.
Some 'Database' operations return an instance of a class derived from 'ItemDescriptor', rather than the object described. For example, 'Database.GetTest' returns a 'TestDescriptor', not a 'Test'. This additional indirection is an optimization; the creation of the actual 'Test' object may be relatively expensive, and in many cases all that is needed is information that can be gleaned from the descriptor.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
Construct an 'ItemDescriptor'. 'database' -- The 'Database' object in which this entity is located. 'instance_id' -- The label for this entity. 'class_name' -- The name of the extension class for the entity. For example, for a 'TestDescriptor', the 'class_name' is the name of the test class. Omit this argument if 'item' is provided. 'arguments' -- A dictionary mapping argument names to argument values. These arguments will be provided to the extension class when the entity is constructed. Omit this argument if 'item' is provided. 'item' -- The item class for this item instance. |
Return the 'Database' containing this entity. returns -- The 'Database' object in which this entity is located. |
Return the class name of the entity. returns -- The name of the extension class for the entity. For example, for a 'TestDescriptor', this method returns the name of the test class. |
Return the class of the entity. returns -- The Python class object for the entity. For example, for a 'TestDescriptor', this method returns the test class. |
Return the arguments specified by the test class. returns -- A list of 'Field' objects containing all the arguments in the class hierarchy. Derived classes should not override this method. |
Return the entity arguments. returns -- A dictionary mapping argument names to argument values. These arguments will be provided to the extension class when the entity is constructed. |
Return the label for this entity. returns -- The label for this entity. |
Return the entity. returns -- An instance of the class returned by 'GetClass'. |
Return the resources required by this item. returns -- A sequence of resource names. Each name indicates a resource that must be available to this item. |
Execute the entity. 'context' -- The 'Context' in which the test should be executed, or 'None' if the 'method' does not take a 'Context' argument. 'result' -- The 'Result' object corresponding to this execution. 'method' -- The method name of the method on the entity that should be invoked to perform the execution. |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Dec 23 12:30:41 2011 | http://epydoc.sourceforge.net |