From f23e0b5e95b5da6d2ed0715712a224673cfa9ad5 Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Tue, 5 Jul 2016 16:03:43 -0400 Subject: [PATCH] Fix test diff output under python2.7 PR #220 broke failed test output under python2.7, which doesn't support the keepends argument to splitlines. --- example/run_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/run_test.py b/example/run_test.py index 70ce4a6c0..da0d9ee77 100755 --- a/example/run_test.py +++ b/example/run_test.py @@ -68,6 +68,6 @@ else: print('Test "%s" FAILED!' % name) print('--- output') print('+++ reference') - print(''.join(difflib.ndiff(output.splitlines(keepends=True), - reference.splitlines(keepends=True)))) + print('\n'.join(difflib.ndiff(output.splitlines(), + reference.splitlines()))) exit(-1)