[Python-checkins] python/dist/src/Doc/lib libdoctest.tex,1.29,1.30
tim_one at users.sourceforge.net
tim_one at users.sourceforge.net
Sun Aug 22 21:43:30 CEST 2004
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6294/Doc/lib
Modified Files:
libdoctest.tex
Log Message:
Added NDIFF_DIFF option.
Index: libdoctest.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdoctest.tex,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- libdoctest.tex 20 Aug 2004 14:37:05 -0000 1.29
+++ libdoctest.tex 22 Aug 2004 19:43:28 -0000 1.30
@@ -356,6 +356,15 @@
actual outputs will be displayed using a context diff.
\end{datadesc}
+\begin{datadesc}{NDIFF_DIFF}
+ When specified, differences are computed by \code{difflib.Differ},
+ using the same algorithm as the popular \file{ndiff.py} utility.
+ This is the only method that marks differences within lines as
+ well as across lines. For example, if a line of expected output
+ contains digit \code{1} where actual output contains letter \code{l},
+ a line is inserted with a caret marking the mismatching column
+ positions.
+\end{datadesc}
A "doctest directive" is a trailing Python comment on a line of a doctest
example:
@@ -414,7 +423,8 @@
\versionchanged[Constants \constant{DONT_ACCEPT_BLANKLINE},
\constant{NORMALIZE_WHITESPACE}, \constant{ELLIPSIS},
- \constant{UNIFIED_DIFF}, and \constant{CONTEXT_DIFF}
+ \constant{UNIFIED_DIFF}, \constant{CONTEXT_DIFF}, and
+ \constant{NDIFF_DIFF}
were added; by default \code{<BLANKLINE>} in expected output
matches an empty line in actual output; and doctest directives
were added]{2.4}
More information about the Python-checkins
mailing list