def test_SimpleStringState(): state = SimpleStringState("A", 0, -1) assert state.get_char_ord(0) == ord("A") assert state.lower(state.get_char_ord(0)) == ord("a")
def create_context(string, string_position, end): state = SimpleStringState(string, 0, end) state.string_position = string_position return state._MatchContext(state, [])