Author: dsahlberg
Date: Sat Nov 23 16:00:18 2024
New Revision: 1922041
URL: http://svn.apache.org/viewvc?rev=1922041&view=rev
Log:
Python ndiff() expects lists of string. But dumpfiles are binary data (see
r1742950). So any test failing because of invalid/unexpected dump file contents
would fail with a TypeError in difflib.py instead of failing with the expected
Failure exception.
* subversion/tests/cmdline/svntest/verify.py
(compare_dump_files): decode lists of actual/expected data to strings before
passing to ndiff().
Discussed at dev@:
https://lists.apache.org/thread/d4v1z29g5vwqkmnslysjn66pz917pdw8
Found by: danielsh
Modified:
subversion/trunk/subversion/tests/cmdline/svntest/verify.py
Modified: subversion/trunk/subversion/tests/cmdline/svntest/verify.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/verify.py?rev=1922041&r1=1922040&r2=1922041&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/verify.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/verify.py Sat Nov 23
16:00:18 2024
@@ -852,7 +852,7 @@ def compare_dump_files(label_expected, l
print('DIFF of raw dumpfiles (including expected differences)')
print('--- ' + (label_expected or 'expected'))
print('+++ ' + (label_actual or 'actual'))
- print(''.join(ndiff(expected, actual)))
+ print(''.join(ndiff([line.decode('utf-8') for line in expected],
[line.decode('utf-8') for line in actual])))
raise svntest.Failure('DIFF of parsed dumpfiles (ignoring expected
differences)\n'
+ '\n'.join(ndiff(
pprint.pformat(parsed_expected).splitlines(),