details: http://www.bx.psu.edu/hg/galaxy/rev/461407cd7013 changeset: 2996:461407cd7013 user: Nate Coraor <nate@bx.psu.edu> date: Tue Nov 10 10:10:29 2009 -0500 description: Don't display diff during tests if it contains non-ascii characters diffstat: test/base/twilltestcase.py | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diffs (14 lines): diff -r 9f485a539bfb -r 461407cd7013 test/base/twilltestcase.py --- a/test/base/twilltestcase.py Mon Nov 09 23:00:55 2009 -0500 +++ b/test/base/twilltestcase.py Tue Nov 10 10:10:29 2009 -0500 @@ -59,6 +59,10 @@ diff_slice[6].startswith( '-/CreationDate' ) and diff_slice[7].startswith( '-/ModDate' ) \ and diff_slice[8].startswith( '+/CreationDate' ) and diff_slice[9].startswith( '+/ModDate' ): return True + for line in diff_slice: + for char in line: + if ord( char ) > 128: + raise AssertionError( "Binary data detected, not displaying diff" ) raise AssertionError( "".join( diff_slice ) ) return True