Ejemplo n.º 1
0
 def test_set_child_sm(self):
     child_state_machine = StateMachine("state_machine")
     state = State("state")
     assert state.child_sm is None
     assert not state.has_child_sm()
     state.set_child_sm(child_state_machine)
     assert state.child_sm is not None
     assert state.has_child_sm()
Ejemplo n.º 2
0
 def test_constructor_default(self):
     state = State("state")
     assert state.name == "state"
     assert state.child_sm is None
     assert not state.has_child_sm()
Ejemplo n.º 3
0
 def test_constructor_with_child(self):
     child_state_machine = StateMachine("state_machine")
     state = State("state", child_state_machine)
     assert state.name == "state"
     assert state.child_sm is not None
     assert state.has_child_sm()