class documentation

class TypeMachineTests(TestCase): (source)

View In Hierarchy

Undocumented

Method test_buildLock ``.build()`` locks the builder so it can no longer be modified.
Method test_dataFactoryArgs Any data factory that takes arguments will constrain the allowed signature of all protocol methods that transition into that state.
Method test_dataFactoryNoArgs Inverse of test_dataFactoryArgs where the data factory specifically does not take arguments, but the input specified does.
Method test_dataToData Undocumented
Method test_genericData Test to cover get_origin in generic assertion.
Method test_incompleteTransitionDefinition Undocumented
Method test_interfaceData Test to cover providedBy assertion.
Method test_invalidTransition Invalid transitions raise a NoTransition exception.
Method test_methodMembership Input methods must be members of their protocol.
Method test_noMethodsInAltStateDataFactory When the state machine is received by a data factory during construction, it is in an invalid state. It may be invoked after construction is complete.
Method test_oneTransition Undocumented
Method test_reentrancy During the execution of a transition behavior implementation function, you may invoke other methods on your state machine. However, the execution of the behavior of those methods will be deferred until the current behavior method is done executing...
Method test_reentrancyNotNoneError Undocumented
Method test_startInAlternateState The state machine can be started in an alternate state.
Method test_stateSpecificData Undocumented
Method test_stateSpecificDataWithoutData To facilitate common implementations of transition behavior methods, sometimes you want to implement a transition within a data state without taking a data parameter. To do this, pass the 'nodata=True' parameter to 'upon'.
def test_buildLock(self): (source)

``.build()`` locks the builder so it can no longer be modified.

def test_dataFactoryArgs(self): (source)

Any data factory that takes arguments will constrain the allowed signature of all protocol methods that transition into that state.

def test_dataFactoryNoArgs(self): (source)

Inverse of test_dataFactoryArgs where the data factory specifically does not take arguments, but the input specified does.

def test_dataToData(self): (source)

Undocumented

def test_genericData(self): (source)

Test to cover get_origin in generic assertion.

def test_incompleteTransitionDefinition(self): (source)

Undocumented

@skipIf((not hasInterface), 'zope.interface not installed')
def test_interfaceData(self): (source)

Test to cover providedBy assertion.

def test_invalidTransition(self): (source)

Invalid transitions raise a NoTransition exception.

def test_methodMembership(self): (source)

Input methods must be members of their protocol.

def test_noMethodsInAltStateDataFactory(self): (source)

When the state machine is received by a data factory during construction, it is in an invalid state. It may be invoked after construction is complete.

def test_oneTransition(self): (source)

Undocumented

def test_reentrancy(self): (source)

During the execution of a transition behavior implementation function, you may invoke other methods on your state machine. However, the execution of the behavior of those methods will be deferred until the current behavior method is done executing. In order to implement that deferral, we restrict the set of methods that can be invoked to those that return None.

Note
it may be possible to implement deferral via Awaitables or Deferreds later, but we are starting simple.
def test_reentrancyNotNoneError(self): (source)

Undocumented

def test_startInAlternateState(self): (source)

The state machine can be started in an alternate state.

def test_stateSpecificData(self): (source)

Undocumented

def test_stateSpecificDataWithoutData(self): (source)

To facilitate common implementations of transition behavior methods, sometimes you want to implement a transition within a data state without taking a data parameter. To do this, pass the 'nodata=True' parameter to 'upon'.