Author: julianfoad
Date: Fri Feb 18 15:11:45 2022
New Revision: 1898185

URL: http://svn.apache.org/viewvc?rev=1898185&view=rev
Log:
Fix a Python2-ism in the test suite.

This code broke under Python3 when trying to display test failure
diagnostics.

* subversion/tests/cmdline/svntest/verify.py
  (RegexListOutput): s/map(None,)/itertools.zip_longest()/

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=1898185&r1=1898184&r2=1898185&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/verify.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/verify.py Fri Feb 18 
15:11:45 2022
@@ -28,6 +28,7 @@ import re, sys
 from difflib import unified_diff, ndiff
 import pprint
 import logging
+import itertools
 
 import svntest
 
@@ -295,7 +296,7 @@ class RegexListOutput(ExpectedOutput):
       if len(self.expected) != len(actual):
         logger.warn('# Expected %d lines; actual %d lines' %
                     (len(self.expected), len(actual)))
-      for e, a in map(None, self.expected_res, actual):
+      for e, a in itertools.zip_longest(self.expected_res, actual):
         if e is not None and a is not None and regex_fullmatch(e, a):
           logger.warn("|  " + a.rstrip())
         else:


Reply via email to