示例#1
0
 def assert_separator(self, stream, start, stop, algorithm, target):
     matcher = Repeat(Any('abc'), start, stop, 
                      algorithm=algorithm, separator=Any(','))
     matcher.config.no_full_first_match()
     result = [''.join(l) 
               for (l, _s) in matcher.match_string(stream)]
     assert target == result, result
示例#2
0
 def assert_separator(self, stream, start, stop, algorithm, target):
     matcher = Repeat(Any('abc'),
                      start,
                      stop,
                      algorithm=algorithm,
                      separator=Any(','))
     matcher.config.no_full_first_match()
     result = [''.join(l) for (l, _s) in matcher.match_string(stream)]
     assert target == result, result