Ejemplo n.º 1
0
 def test_subpatterns(self):
     tokens = parse("^(?:asdf|fdsa$)")
     self.assertTrue(search_regex_tokens(self.end_tokens, tokens))
Ejemplo n.º 2
0
 def test_backwards(self):
     tokens = parse("^asdf$")
     self.assertTrue(
         search_regex_tokens(self.end_tokens, tokens, backwards=True))
Ejemplo n.º 3
0
 def test_branches(self):
     tokens = parse("^asdf|fdsa$")
     self.assertTrue(search_regex_tokens(self.end_tokens, tokens))
Ejemplo n.º 4
0
 def test_no_ending_tokens(self):
     tokens = parse("^asdf")
     self.assertFalse(search_regex_tokens(self.end_tokens, tokens))
Ejemplo n.º 5
0
 def test_no_beginning_or_ending_tokens(self):
     tokens = parse("asdf")
     self.assertFalse(search_regex_tokens(self.beginning_tokens, tokens))
     self.assertFalse(search_regex_tokens(self.end_tokens, tokens))
Ejemplo n.º 6
0
 def test_subpatterns(self):
     tokens = parse("^(?:asdf|fdsa$)")
     self.assertTrue(search_regex_tokens(self.end_tokens, tokens))
Ejemplo n.º 7
0
 def test_beginning_tokens(self):
     tokens = parse("^asdf")
     self.assertTrue(search_regex_tokens(self.beginning_tokens, tokens))
Ejemplo n.º 8
0
 def test_branches(self):
     tokens = parse("^asdf|fdsa$")
     self.assertTrue(search_regex_tokens(self.end_tokens, tokens))
Ejemplo n.º 9
0
 def test_backwards(self):
     tokens = parse("^asdf$")
     self.assertTrue(search_regex_tokens(self.end_tokens, tokens, backwards=True))
Ejemplo n.º 10
0
 def test_no_beginning_or_ending_tokens(self):
     tokens = parse("asdf")
     self.assertFalse(search_regex_tokens(self.beginning_tokens, tokens))
     self.assertFalse(search_regex_tokens(self.end_tokens, tokens))
Ejemplo n.º 11
0
 def test_no_ending_tokens(self):
     tokens = parse("^asdf")
     self.assertFalse(search_regex_tokens(self.end_tokens, tokens))
Ejemplo n.º 12
0
 def test_beginning_tokens(self):
     tokens = parse("^asdf")
     self.assertTrue(search_regex_tokens(self.beginning_tokens, tokens))