Пример #1
0
 def test_no_match_four(self):
     regexp = RegexpADP('hello')
     self.assertEqual(regexp.match("hell"), [])
Пример #2
0
 def test_match_question_dot_one(self):
     regexp = RegexpADP('hell?.')
     self.assertEqual(regexp.match("hello"), ["hell", "hello"])
Пример #3
0
 def test_no_match_four(self):
     regexp = RegexpADP('hello')
     self.assertEqual(regexp.match("hell"), [])
Пример #4
0
 def test_no_match_one(self):
     regexp = RegexpADP('hello')
     self.assertEqual(regexp.match("world"), [])
Пример #5
0
 def test_match_star_three(self):
     regexp = RegexpADP('hello*world')
     self.assertEqual(regexp.match("hellooooworld"), ['hellooooworld'])
Пример #6
0
 def test_match_question_two(self):
     regexp = RegexpADP('hello?world')
     self.assertEqual(regexp.match("hellworld"), ["hellworld"])
Пример #7
0
 def test_match_question_five(self):
     regexp = RegexpADP('abcd?efg')
     self.assertEqual(regexp.match("abcdefg"), ['abcdefg'])
Пример #8
0
 def test_match_question_six(self):
     regexp = RegexpADP('abcd?efg')
     self.assertEqual(regexp.match("bcefg"), [])
Пример #9
0
 def test_match_question_seven(self):
     regexp = RegexpADP('ab')
     self.assertEqual(regexp.match("aaaabbbb"), ['ab'])
Пример #10
0
 def test_match_question_four(self):
     regexp = RegexpADP('helo?world')
     self.assertEqual(regexp.match("helloworld"), [])
Пример #11
0
 def test_match_question_five(self):
     regexp = RegexpADP('abcd?efg')
     self.assertEqual(regexp.match("abcdefg"), ['abcdefg'])
Пример #12
0
 def test_match_question_two(self):
     regexp = RegexpADP('hello?world')
     self.assertEqual(regexp.match("hellworld"), ["hellworld"])
Пример #13
0
 def test_match_dot_three(self):
     regexp = RegexpADP('hello..orld')
     self.assertEqual(regexp.match(
         "hello-world helloworld hello,world hello world"),
         ["hello-world", "hello,world", "hello world"])
Пример #14
0
 def test_match_dot_one(self):
     regexp = RegexpADP('hello.world')
     self.assertEqual(regexp.match("hello|world"), ["hello|world"])
Пример #15
0
 def test_match_dot_one(self):
     regexp = RegexpADP('hello.world')
     self.assertEqual(regexp.match("hello|world"), ["hello|world"])
Пример #16
0
 def test_no_match_one(self):
     regexp = RegexpADP('hello')
     self.assertEqual(regexp.match("world"), [])
Пример #17
0
 def test_match_dot_three(self):
     regexp = RegexpADP('hello..orld')
     self.assertEqual(
         regexp.match("hello-world helloworld hello,world hello world"),
         ["hello-world", "hello,world", "hello world"])
Пример #18
0
 def test_match_star_three(self):
     regexp = RegexpADP('hello*world')
     self.assertEqual(regexp.match("hellooooworld"), ['hellooooworld'])
Пример #19
0
 def test_match_question_four(self):
     regexp = RegexpADP('helo?world')
     self.assertEqual(regexp.match("helloworld"), [])
Пример #20
0
 def test_match_star_four(self):
     regexp = RegexpADP('hello*world')
     self.assertEqual(regexp.match("heloworld"), [])
Пример #21
0
 def test_match_question_six(self):
     regexp = RegexpADP('abcd?efg')
     self.assertEqual(regexp.match("bcefg"), [])
Пример #22
0
 def test_match_question_dot_one(self):
     regexp = RegexpADP('hell?.')
     self.assertEqual(regexp.match("hello"), ["hell", "hello"])
Пример #23
0
 def test_match_question_seven(self):
     regexp = RegexpADP('ab')
     self.assertEqual(regexp.match("aaaabbbb"), ['ab'])
Пример #24
0
 def test_match_question_dot_two(self):
     regexp = RegexpADP('hell?.')
     self.assertEqual(regexp.match("help"), ["help"])
Пример #25
0
 def test_match_star_four(self):
     regexp = RegexpADP('hello*world')
     self.assertEqual(regexp.match("heloworld"), [])
Пример #26
0
 def test_no_match_three(self):
     regexp = RegexpADP('')
     self.assertEqual(regexp.match("helloworld"), [])
Пример #27
0
 def test_match_question_dot_two(self):
     regexp = RegexpADP('hell?.')
     self.assertEqual(regexp.match("help"), ["help"])
Пример #28
0
 def test_no_match_three(self):
     regexp = RegexpADP('')
     self.assertEqual(regexp.match("helloworld"), [])