# HG changeset patch # User Matt Mackall # Date 1402695413 18000 # Node ID 8a63e691179a4cefacefd7ae1bb1fc9e9a2f6c6d # Parent 07eb76186b416ebd34780e455969fe431e11ae7e run-tests: filter whitespace at end of error diffs Python 2.6 and 2.7 produce slightly different diff headers. diff -r 07eb76186b41 -r 8a63e691179a tests/run-tests.py --- a/tests/run-tests.py Thu Jun 12 01:28:22 2014 +0530 +++ b/tests/run-tests.py Fri Jun 13 16:36:53 2014 -0500 @@ -286,6 +286,9 @@ servefail = False lines = [] for line in difflib.unified_diff(expected, output, ref, err): + if line.startswith('+++') or line.startswith('---'): + if line.endswith(' \n'): + line = line[:-2] + '\n' lines.append(line) if not servefail and line.startswith( '+ abort: child process failed to start'):