Exemple #1
0
 def test_case_12(self):
     self.assertEqual(patternMatcher("yyyy", "testtesttesttest"),
                      ["", "test"])
Exemple #2
0
 def test_case_2(self):
     self.assertEqual(patternMatcher("yxyx", "abab"), ["b", "a"])
Exemple #3
0
 def test_case_1(self):
     self.assertEqual(patternMatcher("xyxy", "abab"), ["a", "b"])
Exemple #4
0
 def test_case_11(self):
     self.assertEqual(patternMatcher("xxxx", "testtesttesttest"),
                      ["test", ""])
Exemple #5
0
 def test_case_9(self):
     self.assertEqual(
         patternMatcher(
             "xyxxxyyx",
             "baddaddoombaddadoomibaddaddoombaddaddoombaddaddoombaddaddoomibaddaddoomibaddaddoom"
         ), [])
Exemple #6
0
 def test_case_10(self):
     self.assertEqual(patternMatcher("xyx", "thisshouldobviouslybewrong"),
                      [])
Exemple #7
0
 def test_case_8(self):
     self.assertEqual(
         patternMatcher("xxyxyy", "testtestwrongtestwrongtest"), [])
Exemple #8
0
 def test_case_7(self):
     self.assertEqual(
         patternMatcher(
             "yxyyyxxy",
             "baddaddoombaddaddoomibaddaddoombaddaddoombaddaddoombaddaddoomibaddaddoomibaddaddoom"
         ), ["baddaddoomi", "baddaddoom"])
Exemple #9
0
 def test_case_5(self):
     self.assertEqual(
         patternMatcher("yyxyyx", "gogopowerrangergogopowerranger"),
         ["powerranger", "go"])
Exemple #10
0
 def test_case_4(self):
     self.assertEqual(
         patternMatcher("xxyxxy", "gogopowerrangergogopowerranger"),
         ["go", "powerranger"])
Exemple #11
0
 def test_case_3(self):
     self.assertEqual(patternMatcher("yxx", "yomama"), ["ma", "yo"])