You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2013/02/07 03:30:46 UTC
svn commit: r1443295 -
/subversion/trunk/subversion/tests/cmdline/svntest/verify.py
Author: julianfoad
Date: Thu Feb 7 02:30:46 2013
New Revision: 1443295
URL: http://svn.apache.org/viewvc?rev=1443295&view=rev
Log:
When displaying expected and actual output of a test failure, print the
lines via the logger object for consistency with other output, and prefix
them with an additional vertical bar for visual clarity.
* subversion/tests/cmdline/svntest/verify.py
(display_lines): Print via the logger; add a '| ' prefix.
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=1443295&r1=1443294&r2=1443295&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/verify.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/verify.py Thu Feb 7 02:30:46 2013
@@ -284,36 +284,34 @@ def display_lines(message, label, expect
Both EXPECTED and ACTUAL may be strings or lists of strings."""
if message is not None:
logger.warn(message)
+
+ if type(expected) is str:
+ expected = [expected]
+ if type(actual) is str:
+ actual = [actual]
if expected is not None:
output = 'EXPECTED %s' % label
if expected_is_regexp:
output += ' (regexp)'
- expected = [expected + '\n']
if expected_is_unordered:
output += ' (unordered)'
output += ':'
logger.warn(output)
for x in expected:
- sys.stdout.write(x)
+ logger.warn('| ' + x.rstrip())
if actual is not None:
logger.warn('ACTUAL %s:', label)
for x in actual:
- sys.stdout.write(x)
+ logger.warn('| ' + x.rstrip())
# Additionally print unified diff
if not expected_is_regexp:
logger.warn('DIFF ' + ' '.join(output.split(' ')[1:]))
- if type(expected) is str:
- expected = [expected]
-
- if type(actual) is str:
- actual = [actual]
-
for x in unified_diff(expected, actual,
fromfile="EXPECTED %s" % label,
tofile="ACTUAL %s" % label):
- sys.stdout.write(x)
+ logger.warn('| ' + x.rstrip())
def compare_and_display_lines(message, label, expected, actual,
raisable=None):