[Python-checkins] python/dist/src/Lib/test test_doctest.py, 1.35, 1.36

tim_one at users.sourceforge.net tim_one at users.sourceforge.net
Thu Aug 26 07:44:29 CEST 2004


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21813/Lib/test

Modified Files:
	test_doctest.py 
Log Message:
output_difference():  In fancy-diff cases, the way this split expected &
actual output into lines created spurious empty lines at the ends of
each.  Those matched, but the fancy diffs had surprising line counts (1
larger than expected), and tests kept having to slam <BLANKLINE> into the
expected output to account for this.  Using the splitlines() string method
with keepends=True instead accomplishes what was intended directly.


Index: test_doctest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_doctest.py,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- test_doctest.py	26 Aug 2004 02:45:51 -0000	1.35
+++ test_doctest.py	26 Aug 2004 05:44:27 -0000	1.36
@@ -972,7 +972,7 @@
     Failed example:
         print '\n'.join('abcdefg')
     Differences (unified diff with -expected +actual):
-        @@ -1,8 +1,8 @@
+        @@ -1,7 +1,7 @@
          a
         -B
         +b
@@ -982,7 +982,6 @@
          f
          g
         -h
-    <BLANKLINE>
     (1, 1)
 
 The REPORT_CDIFF flag causes failures that involve multi-line expected
@@ -998,7 +997,7 @@
         print '\n'.join('abcdefg')
     Differences (context diff with expected followed by actual):
         ***************
-        *** 1,8 ****
+        *** 1,7 ****
           a
         ! B
           c
@@ -1006,8 +1005,7 @@
           f
           g
         - h
-    <BLANKLINE>
-        --- 1,8 ----
+        --- 1,7 ----
           a
         ! b
           c
@@ -1015,7 +1013,6 @@
         + e
           f
           g
-    <BLANKLINE>
     (1, 1)
 
 
@@ -1040,7 +1037,6 @@
         ?                       ^
         + a b  c d e f g h i   j k l m
         ?     +              ++    ^
-    <BLANKLINE>
     (1, 1)
 
 The REPORT_ONLY_FIRST_FAILURE supresses result output after the first



More information about the Python-checkins mailing list