Package qm :: Package test :: Package classes :: Module process_target :: Class ProcessTarget
[hide private]
[frames] | no frames]

Class ProcessTarget

source code

         object --+        
                  |        
extension.Extension --+    
                      |    
          target.Target --+
                          |
                         ProcessTarget

A 'ProcessTarget' runs tests in child processes.

Nested Classes [hide private]
  QMTestExecutable
A 'QMTestExecutable' redirects commands to a child process.

Inherited from extension.Extension: Type, __metaclass__

Instance Methods [hide private]
 
__init__(self, database, properties)
Construct a new 'ProcessTarget'.
source code
 
IsIdle(self)
Return true if the target is idle.
source code
 
Start(self, response_queue, engine=None)
Start the target.
source code
 
Stop(self)
Stop the target.
source code
 
RunTest(self, descriptor, context)
Run the test given by 'test_id'.
source code
 
_GetInterpreter(self)
Return the interpreter to use.
source code
 
__ReadResults(self, fd)
Read results from one of the children.
source code

Inherited from target.Target: GetDatabase, GetGroup, GetName, IsInGroup

Inherited from target.Target (private): _BeginResourceSetUp, _CleanUpResource, _FinishResourceSetUp, _GetTemporaryDirectory, _RecordResult, _SetUpResource

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

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

Class Variables [hide private]
  arguments = [qm.fields.IntegerField(name= "processes", title= ...
A list of the arguments to the extension class.

Inherited from target.Target: kind

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, database, properties)
(Constructor)

source code 

Construct a new 'ProcessTarget'.

'database' -- The 'Database' containing the tests that will be run.

'properties' -- A dictionary mapping strings (property names) to strings (property values).

Overrides: object.__init__

IsIdle(self)

source code 

Return true if the target is idle.

returns -- True if the target is idle. If the target is idle, additional tasks may be assigned to it.

Overrides: target.Target.IsIdle

Start(self, response_queue, engine=None)

source code 

Start the target.

'response_queue' -- The 'Queue' in which the results of test executions are placed.

'engine' -- The 'ExecutionEngine' that is starting the target, or 'None' if this target is being started without an 'ExecutionEngine'.

Overrides: target.Target.Start

Stop(self)

source code 

Stop the target.

postconditions -- The target may no longer be used.

Overrides: target.Target.Stop

RunTest(self, descriptor, context)

source code 

Run the test given by 'test_id'.

'descriptor' -- The 'TestDescriptor' for the test.

'context' -- The 'Context' in which to run the test.

Overrides: target.Target.RunTest

_GetInterpreter(self)

source code 

Return the interpreter to use.

returns -- A list giving the path to an interpreter, and arguments to provide the interpreter. This interpreter is used to run QMTest. If '[]' is returned, then no intepreter is used.

__ReadResults(self, fd)

source code 

Read results from one of the children.

'fd' -- The descriptor from which the results should be read.


Class Variable Details [hide private]

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:
[qm.fields.IntegerField(name= "processes", title= "Number of Processes\
", description= """The number of processes to devote to running tests.

            A positive integer that indicates the number of processes \
to
            use when running tests.  Larger numbers will allow more
            tests to be run at once.  You can experiment with this
            value to find the number that results in the fastest
...