]> granicus.if.org Git - python/commitdiff
- Added a "parser" option to testfile() and DocFileTest().
authorEdward Loper <edloper@gradient.cis.upenn.edu>
Mon, 27 Sep 2004 04:08:20 +0000 (04:08 +0000)
committerEdward Loper <edloper@gradient.cis.upenn.edu>
Mon, 27 Sep 2004 04:08:20 +0000 (04:08 +0000)
Doc/lib/libdoctest.tex

index 81a472ce07d76d9a3465450aa5d52b5b8dab7609..26354864732cd37f64e534f6382b7b2b763a5815 100644 (file)
@@ -817,7 +817,8 @@ sections \ref{doctest-simple-testmod} and
                           name}\optional{, package}\optional{,
                           globs}\optional{, verbose}\optional{,
                           report}\optional{, optionflags}\optional{,
-                          extraglobs}\optional{, raise_on_error}}
+                          extraglobs}\optional{, raise_on_error}\optional{,
+                          parser}}
 
   All arguments except \var{filename} are optional, and should be
   specified in keyword form.
@@ -886,6 +887,10 @@ sections \ref{doctest-simple-testmod} and
   in an example.  This allows failures to be post-mortem debugged.
   Default behavior is to continue running examples.
 
+  Optional argument \var{parser} specifies a \class{DocTestParser} (or
+  subclass) that should be used to extract tests from the files.  It
+  defaults to a normal parser (i.e., \code{\class{DocTestParser}()}).
+
   \versionadded{2.4}
 \end{funcdesc}
 
@@ -1065,6 +1070,10 @@ instances from text files and modules with doctests:
   See function \function{set_unittest_reportflags()} below for
   a better way to set reporting options.
 
+  Optional argument \var{parser} specifies a \class{DocTestParser} (or
+  subclass) that should be used to extract tests from the files.  It
+  defaults to a normal parser (i.e., \code{\class{DocTestParser}()}).
+
   \versionadded{2.4}
 \end{funcdesc}