def _prev_index(self, s):
        self.set_index(max(0, self.index - 1))
def test_regex_flags_good_input():
    cases = (
        'abcd',
        'ABCabc',
        'ABC',
    )

    case_insensitive = inputs.regex(r'^[A-Z]+$', re.IGNORECASE)

    for value in cases:
        yield assert_equal, case_insensitive(value), value