Exemplo n.º 1
0
 def test_single(self):
     #basicConfig(level=DEBUG)
     expr = Literal('*')[:,...][3]
     expr.config.clear().low_memory(5)
     match = expr.get_match_string()('*' * 4)
     list(match)
     
Exemplo n.º 2
0
 def assert_range(self, n_match, direcn, results, multiplier):
     for index in range(len(results)):
         queue_len = index * multiplier
         expr = Literal('*')[::direcn,...][n_match] & Eos()
         expr.config.clear().low_memory(queue_len)
         matcher = expr.get_match_string()
         self.assert_count(matcher, queue_len, index, results[index])