+ return MatchError("Mismatch at line %d\n- %s\n+ %s\n" %
+ (i+1, matches[i], lines[i]))
+ if len(lines) < len(matches):
+ return MatchError("Missing lines at line %d\n- %s" %
+ (len(lines), "\n- ".join(matches[len(lines):])))
+ if len(lines) > len(matches):
+ return MatchError("Extra lines at line %d\n+ %s" %
+ (len(matches), "\n+ ".join(lines[len(matches):])))