Package qm :: Module test :: Module runnable :: Class Runnable
[hide private]
[frames] | no frames]

Class Runnable
source code

         object --+    
                  |    
extension.Extension --+
                      |
                     Runnable
Known Subclasses:
resource.Resource, test.Test

A 'Runnable' can run on a 'Target'.

'Runnable' is an abstract base class for 'Test' and 'Resource'.

Nested Classes [hide private]
ResourceField A 'ResourceField' contains the name of a resource.

Inherited from extension.Extension: Type, __metaclass__


Instance Methods [hide private]
  GetAttachments(self)
Return the 'Attachment's to this 'Runnable'.
  GetDatabase(self)
Return the 'Database' in which this test or resource is stored.
  GetId(self)
Return the name of this test or resource.
  __GetAttachments(self, field, value, attachments)
Return the 'Attachments' that are part of 'field'.
  __init__(self, arguments=None, **args)
Construct a new 'Runnable'.

Inherited from extension.Extension: GetClassName, GetExplicitArguments, MakeDomDocument, MakeDomElement, Write, __getattr__

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


Class Variables [hide private]
EXTRA_DATABASE The name of the extra keyword argument to '__init__' that specifies the database containing the test or resource.
EXTRA_ID The name of the extra keyword argument to '__init__' that specifies the name of the test or resource.
RESOURCE_FIELD_ID The name of the field that contains the resources on which this test or resource depends.
_argument_dictionary A map from argument names to 'Field' instances.
_argument_list A list of all the 'Field's in this class.
arguments A list of the arguments to the extension class.
resources  

Inherited from extension.Extension: kind

Inherited from object: __class__


Method Details [hide private]

GetAttachments(self)

source code 

Return the 'Attachment's to this 'Runnable'.

returns -- A sequence consisting of the 'Attachment' objects associated with this runnable.

GetDatabase(self)

source code 

Return the 'Database' in which this test or resource is stored.

returns -- The 'Database' in which this test or resource is stored.

GetId(self)

source code 

Return the name of this test or resource.

'context' -- The 'Context' in which this entity is running.

returns -- The name of this test or resource.

__GetAttachments(self, field, value, attachments)

source code 

Return the 'Attachments' that are part of 'field'.

'field' -- The 'Field' being examined.

'value' -- The value of that 'Field' in 'self'.

'attachments' -- A sequence consisting of the attachments found so far. Additional 'Attachment's are appended to this sequence by this function.

__init__(self, arguments=None, **args)
(Constructor)

source code 

Construct a new 'Runnable'.

'arguments' -- As for 'Extension.__init__'.

'args' -- As for 'Extension.__init__.
Overrides: extension.Extension.__init__

Class Variable Details [hide private]

EXTRA_DATABASE

The name of the extra keyword argument to '__init__' that specifies the database containing the test or resource.
Value:
'qmtest_database'                                                      
      

EXTRA_ID

The name of the extra keyword argument to '__init__' that specifies the name of the test or resource.
Value:
'qmtest_id'                                                            
      

RESOURCE_FIELD_ID

The name of the field that contains the resources on which this test or resource depends.
Value:
'resources'                                                            
      

_argument_dictionary

A map from argument names to 'Field' instances.

A map from the names of arguments for this class to the corresponding 'Field'.
Value:
{'resources': <<class 'qm.fields.SetField'> resources>}                
      

_argument_list

A list of all the 'Field's in this class.

This list combines the complete list of 'arguments'. 'Field's appear in the order reached by a pre-order breadth-first traversal of the hierarchy, starting from the most derived class.
Value:
[<<class 'qm.fields.SetField'> resources>]                             
      

arguments

A list of the arguments to the extension class.

Each element of this list should be an instance of 'Field'. The 'Field' instance describes the argument.

Derived classes may redefine this class variable. However, derived classes should not explicitly include the arguments from base classes; QMTest will automatically combine all the arguments found throughout the class hierarchy.
Value:
[<<class 'qm.fields.SetField'> resources>]                             
      

resources

Value:
[]