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

Class __TestStatus

source code

object --+
         |
        ExecutionEngine.__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 help(type(x)) for signature
source code
 
GetState(self)
Return the state of this test.
source code
 
NoteQueued(self)
Place the test into the "queued" state.
source code
 
HasBeenQueued(self)
Returns true if the test was ever queued.
source code
 
NoteReady(self)
Place the test into the "ready" state.
source code
 
HasBeenReady(self)
Returns true if the test was ever ready.
source code
 
IsFinished(self)
Returns true if the test is in the "finished" state.
source code
 
NoteDependant(self, test_id)
Note that 'test_id' depends on 'self'.
source code

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

Class Variables [hide private]
  QUEUED = "QUEUED"
  READY = "READY"
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) 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.

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.

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.