コード例 #1
0
def test_valid_transition_false() -> None:
    manager = StateMachineManager()
    assert manager.valid_transition(modes.INIT, modes.RESET) == False
コード例 #2
0
def test_valid_transition_invalid_mode_name() -> None:
    manager = StateMachineManager()
    assert manager.valid_transition("Junk From", "Junk To") == False
コード例 #3
0
def test_valid_transition_true() -> None:
    manager = StateMachineManager()
    assert manager.valid_transition(modes.INIT, modes.NORMAL) == True