Example #1
0
 def test_match_empty_string(self):
     self.assertFalse(match(string='', pattern='absd*.'))
Example #2
0
 def test_match_any_character_string_dot(self):
     self.assertTrue(match(string='a', pattern='.'))
Example #3
0
 def test_match_empty_pattern(self):
     self.assertFalse(match(string='aasdasd', pattern=''))
Example #4
0
 def test_match_any_character_string_repeating_times_dot_last(self):
     self.assertFalse(match(string='mississippi', pattern='mis*is*p*.'))
Example #5
0
 def test_match_any_character_string_repeating_times(self):
     self.assertTrue(match(string='aab', pattern='c*a*b'))
Example #6
0
 def test_match_any_character_string_repeating(self):
     self.assertTrue(match(string='ab', pattern='.*'))
Example #7
0
 def test_match_string_repeating(self):
     self.assertTrue(match(string='aa', pattern='a*'))
     self.assertTrue(match(string='aaa', pattern='a*'))
     self.assertTrue(match(string='aaaa', pattern='a*'))
     self.assertTrue(match(string='a', pattern='a*'))
Example #8
0
 def test_match_string_aa(self):
     self.assertFalse(match(string='aa', pattern='a'))