class TypeMachineTests(TestCase): (source)
Undocumented
Method | test_build |
``.build()`` locks the builder so it can no longer be modified. |
Method | test_data |
Any data factory that takes arguments will constrain the allowed signature of all protocol methods that transition into that state. |
Method | test_data |
Inverse of test_dataFactoryArgs where the data factory specifically does not take arguments, but the input specified does. |
Method | test_data |
Undocumented |
Method | test_generic |
Test to cover get_origin in generic assertion. |
Method | test_incomplete |
Undocumented |
Method | test_interface |
Test to cover providedBy assertion. |
Method | test_invalid |
Invalid transitions raise a NoTransition exception. |
Method | test_method |
Input methods must be members of their protocol. |
Method | test_no |
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_one |
Undocumented |
Method | test |
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_reentrancy |
Undocumented |
Method | test_start |
The state machine can be started in an alternate state. |
Method | test_state |
Undocumented |
Method | test_state |
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'. |
Any data factory that takes arguments will constrain the allowed signature of all protocol methods that transition into that state.
Inverse of test_dataFactoryArgs where the data factory specifically does not take arguments, but the input specified does.
def test_interfaceData(self): (source) ¶
Test to cover providedBy assertion.
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.
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. |