[Python-checkins] python/dist/src/Doc/lib libdoctest.tex,1.11,1.12

fdrake@users.sourceforge.net fdrake@users.sourceforge.net
2003年6月27日 20:09:08 -0700


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv4718/lib
Modified Files:
	libdoctest.tex 
Log Message:
fix markup nits
Index: libdoctest.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdoctest.tex,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** libdoctest.tex	27 Jun 2003 20:48:05 -0000	1.11
--- libdoctest.tex	28 Jun 2003 03:09:06 -0000	1.12
***************
*** 154,158 ****
 
 If you want to test the module as the main module, you don't need to
! pass M to \function{testmod}; in this case, it will test the current
 module.
 
--- 154,158 ----
 
 If you want to test the module as the main module, you don't need to
! pass M to \function{testmod()}; in this case, it will test the current
 module.
 
***************
*** 177,185 ****
 along with assorted summaries at the end.
 
! You can force verbose mode by passing \code{verbose=1} to testmod, or
 prohibit it by passing \code{verbose=0}. In either of those cases,
! \code{sys.argv} is not examined by testmod.
 
! In any case, testmod returns a 2-tuple of ints \code{(\var{f},
 \var{t})}, where \var{f} is the number of docstring examples that
 failed and \var{t} is the total number of docstring examples
--- 177,186 ----
 along with assorted summaries at the end.
 
! You can force verbose mode by passing \code{verbose=1} to
! \function{testmod()}, or
 prohibit it by passing \code{verbose=0}. In either of those cases,
! \code{sys.argv} is not examined by \function{testmod()}.
 
! In any case, \function{testmod()} returns a 2-tuple of ints \code{(\var{f},
 \var{t})}, where \var{f} is the number of docstring examples that
 failed and \var{t} is the total number of docstring examples
***************
*** 211,216 ****
 \subsection{What's the Execution Context?}
 
! By default, each time testmod finds a docstring to test, it uses a
! \emph{copy} of \module{M}'s globals, so that running tests on a module
 doesn't change the module's real globals, and so that one test in
 \module{M} can't leave behind crumbs that accidentally allow another test
--- 212,217 ----
 \subsection{What's the Execution Context?}
 
! By default, each time \function{testmod()} finds a docstring to test, it uses
! a \emph{copy} of \module{M}'s globals, so that running tests on a module
 doesn't change the module's real globals, and so that one test in
 \module{M} can't leave behind crumbs that accidentally allow another test
***************
*** 401,412 ****
 
 \item WYSIWYG isn't always the case, starting in Python 2.3. The
! string form of boolean results changed from \code{"0"} and
! \code{"1"} to \code{"False"} and \code{"True"} in Python 2.3.
 This makes it clumsy to write a doctest showing boolean results that
 passes under multiple versions of Python. In Python 2.3, by default,
 and as a special case, if an expected output block consists solely
! of \code{"0"} and the actual output block consists solely of
! \code{"False"}, that's accepted as an exact match, and similarly for
! \code{"1"} versus \code{"True"}. This behavior can be turned off by
 passing the new (in 2.3) module constant
 \constant{DONT_ACCEPT_TRUE_FOR_1} as the value of \function{testmod()}'s
--- 402,413 ----
 
 \item WYSIWYG isn't always the case, starting in Python 2.3. The
! string form of boolean results changed from \code{'0'} and
! \code{'1'} to \code{'False'} and \code{'True'} in Python 2.3.
 This makes it clumsy to write a doctest showing boolean results that
 passes under multiple versions of Python. In Python 2.3, by default,
 and as a special case, if an expected output block consists solely
! of \code{'0'} and the actual output block consists solely of
! \code{'False'}, that's accepted as an exact match, and similarly for
! \code{'1'} versus \code{'True'}. This behavior can be turned off by
 passing the new (in 2.3) module constant
 \constant{DONT_ACCEPT_TRUE_FOR_1} as the value of \function{testmod()}'s
***************
*** 414,418 ****
 the integer spellings of booleans are history, this hack will
 probably be removed again.
- 
 
 \end{enumerate}
--- 415,418 ----

AltStyle によって変換されたページ (->オリジナル) /