Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
0041121c
Commit
0041121c
authored
Sep 26, 2004
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs for run_docstring_examples().
parent
aa241e01
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
Doc/lib/libdoctest.tex
Doc/lib/libdoctest.tex
+30
-0
No files found.
Doc/lib/libdoctest.tex
View file @
0041121c
...
...
@@ -944,6 +944,36 @@ sections \ref{doctest-simple-testmod} and
and
\var
{
exclude
_
empty
}
were added]
{
2.4
}
\end{funcdesc}
There's also a function to run the doctests associated with a single object.
This function is provided for backward compatibility. There are no plans
to deprecate it, but it's rarely useful:
\begin{funcdesc}
{
run
_
docstring
_
examples
}{
f, globs
\optional
{
,
verbose
}
\optional
{
, name
}
\optional
{
,
compileflags
}
\optional
{
, optionflags
}}
Test examples associated with object
\var
{
f
}
; for example,
\var
{
f
}
may
be a module, function, or class object.
A shallow copy of dictionary argument
\var
{
globs
}
is used for the
execution context.
Optional argument
\var
{
name
}
is used in failure messages, and defaults
to
\code
{
"NoName"
}
.
If optional argument
\var
{
verbose
}
is true, output is generated even
if there are no failures. By default, output is generated only in case
of an example failure.
Optional argument
\var
{
compileflags
}
gives the set of flags that should
be used by the Python compiler when running the examples. By default, or
if
\code
{
None
}
, flags are deduced corresponding to the set of future
features found in
\var
{
globs
}
.
Optional argument
\var
{
optionflags
}
works as for function
\function
{
testfile()
}
above.
\end{funcdesc}
\subsection
{
Unittest API
\label
{
doctest-unittest-api
}}
As your collection of doctest'ed modules grows, you'll want a way to run
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment