Mercurial > hg > mercurial-source
comparison tests/run-tests.py @ 21737:8a63e691179a
run-tests: filter whitespace at end of error diffs
Python 2.6 and 2.7 produce slightly different diff headers.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 13 Jun 2014 16:36:53 -0500 |
parents | 07eb76186b41 |
children | 11e5ad038a7b |
comparison
equal
deleted
inserted
replaced
21736:07eb76186b41 | 21737:8a63e691179a |
---|---|
284 | 284 |
285 def getdiff(expected, output, ref, err): | 285 def getdiff(expected, output, ref, err): |
286 servefail = False | 286 servefail = False |
287 lines = [] | 287 lines = [] |
288 for line in difflib.unified_diff(expected, output, ref, err): | 288 for line in difflib.unified_diff(expected, output, ref, err): |
289 if line.startswith('+++') or line.startswith('---'): | |
290 if line.endswith(' \n'): | |
291 line = line[:-2] + '\n' | |
289 lines.append(line) | 292 lines.append(line) |
290 if not servefail and line.startswith( | 293 if not servefail and line.startswith( |
291 '+ abort: child process failed to start'): | 294 '+ abort: child process failed to start'): |
292 servefail = True | 295 servefail = True |
293 | 296 |