    def test_simple_on_exit(self):
        '''Tests a simple action being performed exiting from a state.'''
        helper = Helper()
        states = ['one', 'two']
        transitions = [
            {'source': 'one', 'dest': 'two'},
            {'source': 'two', 'dest': 'one'},
        ]
        on_exit = {
            'one': helper.increment
        }
        sm = StateMachine(states, transitions, 'one', on_exit=on_exit)
        assert(helper.x == 0)
        sm.step()
        assert(helper.x == 1)
        sm.step()
        assert(helper.x == 1)
Tests a simple action being performed exiting from a state.
tests/state_machine_test.py