def test_error_on_state_method_shadow():
    """Test that an error is thrown when an event handler shadows a state method."""
    with pytest.raises(NameError) as err:

        class InvalidTest(BaseState):
            def reset(self):
                pass

    assert (
        err.value.args[0]
        == "The event handler name `reset` shadows a builtin State method; use a different name instead"
    )
Test that an error is thrown when an event handler shadows a state method.
tests/units/test_state.py