def assert_simple(self, stream, start, stop, algorithm, target): matcher = Repeat(RangeMatch(), start, stop, algorithm=algorithm) matcher.config.no_full_first_match() result = list(matcher.match_list(stream)) #print(result) result = [''.join(map(str, l)) for (l, _s) in result] assert target == result, result