예제 #1
0
    def test_raises_argument_error(self):
        regex_type = types.RegexType(r'a+b*')

        with self.assertRaises(ArgumentTypeError):
            regex_type('')
            regex_type('b')
            regex_type('baaaa')
예제 #2
0
    def test_regex_match(self):
        regex_type = types.RegexType(r'a+b*')

        regex_type('a')
        regex_type('aab')
        regex_type('abbbbbbb')