Package qm :: Package test :: Module execution_engine :: Class ExecutionEngine :: Class __TestStatus
[hide private]
[frames] | no frames]

Class __TestStatus
source code

object --+
         |
        __TestStatus

A '__TestStatus' indicates whether or not a test has been run.

The 'outcome' slot indicates whether the test has not be queued so
that it can be run, has completed, or has not been processed at all.

If there are tests that have this test as a prerequisite, they are
recorded in the 'dependants' slot.

Ever test passes through the following states, in the following
order:

1. Initial

   A test in this state has not yet been processed.  In this state,
   the 'outcome' slot is 'None'.

2. Queued

   A test in this state has been placed on the stack of tests
   waiting to run.  In this state, the 'outcome' slot is
   'QUEUED'.  Such a test may be waiting for prerequisites to
   complete before it can run.

3. Ready

   A test in this state is ready to run.  All prerequisites have
   completed, and their outcomes were as expected.  In this
   state, the 'outcome' slot is 'READY'.

4. Finished

   A test in this state has finished running.  In this state, the
   'outcome' slot is one of the 'Result.outcomes'.

The only exception to this order is that when an error is noted
(like a failure to load a test from the database, or a
prerequisite has an unexpected outcome) a test may jump to the
"finished" state without passing through intermediate states.



Instance Methods [hide private]
  __init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  GetState(self)
Return the state of this test.
  NoteQueued(self)
Place the test into the "queued" state.
  HasBeenQueued(self)
Returns true if the test was ever queued.
  NoteReady(self)
Place the test into the "ready" state.
  HasBeenReady(self)
Returns true if the test was ever ready.
  IsFinished(self)
Returns true if the test is in the "finished" state.
  NoteDependant(self, test_id)
Note that 'test_id' depends on 'self'.

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


Class Variables [hide private]
__slots__  
QUEUED  
READY  
dependants  
outcome  

Inherited from object: __class__


Method Details [hide private]

__init__(self)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

GetState(self)

source code 

Return the state of this test.

returns -- The state of this test, using the representation documented above.

NoteQueued(self)

source code 
Place the test into the "queued" state.

HasBeenQueued(self)

source code 

Returns true if the test was ever queued.

returns -- True if the test has ever been on the queue. Such a test may be ready to run, or may in fact have already run to completion.

NoteReady(self)

source code 
Place the test into the "ready" state.

HasBeenReady(self)

source code 

Returns true if the test was ever ready.

returns -- True if the test was every ready to run. Such a test may have already run to completion.

IsFinished(self)

source code 

Returns true if the test is in the "finished" state.

returns -- True if this test is in the "finished" state.

NoteDependant(self, test_id)

source code 

Note that 'test_id' depends on 'self'.

'test_id' -- The name of a test. That test has this test as a prerequisite.

Class Variable Details [hide private]

__slots__

Value:
('outcome', 'dependants')                                              
      

QUEUED

Value:
'QUEUED'                                                               
      

READY

Value:
'READY'                                                                
      

dependants

Value:
<member 'dependants' of '__TestStatus' objects>                        
      

outcome

Value:
<member 'outcome' of '__TestStatus' objects>