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
7a15fef1
Commit
7a15fef1
authored
Aug 13, 2004
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Markup fiddling.
parent
f1d8ea82
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
Doc/lib/libdoctest.tex
Doc/lib/libdoctest.tex
+7
-7
No files found.
Doc/lib/libdoctest.tex
View file @
7a15fef1
...
...
@@ -159,7 +159,7 @@ python M.py
This won't display anything unless an example fails, in which case the
failing example(s) and the cause(s) of the failure(s) are printed to stdout,
and the final line of output is
\
\
code
{
'***Test Failed***
\var
{
N
}
failures.'
}
, where
\var
{
N
}
is the
\
samp
{
'***Test Failed***
\var
{
N
}
failures.'
}
, where
\var
{
N
}
is the
number of examples that failed.
Run it with the
\programopt
{
-v
}
switch instead:
...
...
@@ -203,7 +203,7 @@ attempted.
Only docstrings attached to objects belonging to module
\var
{
m
}
are
searched.
Return
\
code
{
(
\var
{
failure
_
count
}
,
\var
{
test
_
count
}
)
}
.
Return
\
samp
{
(
\var
{
failure
_
count
}
,
\var
{
test
_
count
}
)
}
.
Optional argument
\var
{
name
}
gives the name of the module; by default,
or if
\code
{
None
}
,
\code
{
\var
{
m
}
.
__
name
__}
is used.
...
...
@@ -227,7 +227,7 @@ attempted.
Optional argument
\var
{
verbose
}
prints lots of stuff if true, and prints
only failures if false; by default, or if
\code
{
None
}
, it's true
if and only if
\code
{
'-v'
}
is in
\code
{
\module
{
sys
}
.argv
}
.
if and only if
\code
{
'-v'
}
is in
\code
{
sys
.argv
}
.
Optional argument
\var
{
report
}
prints a summary at the end when true,
else prints nothing at the end. In verbose mode, the summary is
...
...
@@ -245,7 +245,7 @@ attempted.
Optional argument
\var
{
isprivate
}
specifies a function used to
determine whether a name is private. The default function treats
all names as public.
\var
{
isprivate
}
can be set to
\code
{
\module
{
doctest
}
.is
_
private
}
to skip over names that are
\code
{
doctest
.is
_
private
}
to skip over names that are
private according to Python's underscore naming convention.
\deprecated
{
2.4
}{
\var
{
isprivate
}
was a stupid idea -- don't use it.
If you need to skip tests based on name, filter the list returned by
...
...
@@ -287,7 +287,7 @@ Any classes found are recursively searched similarly, to test docstrings in
their contained methods and nested classes.
\versionchanged
[A "private name" concept is deprecated and no longer
documented
.
]
{
2.4
}
documented]
{
2.4
}
\subsection
{
What's the Execution Context?
}
...
...
@@ -366,7 +366,7 @@ also be used in doctest directives.
can match any substring in the actual output. This includes
substrings that span line boundaries, so it's best to keep usage of
this simple. Complicated uses can lead to the same kinds of
surprises that
\
code
{
.*
}
is prone to in regular expressions.
surprises that
\
regexp
{
.*
}
is prone to in regular expressions.
\end{datadesc}
\begin{datadesc}
{
UNIFIED
_
DIFF
}
...
...
@@ -384,7 +384,7 @@ also be used in doctest directives.
\constant
{
NORMALIZE
_
WHITESPACE
}
,
\constant
{
ELLIPSIS
}
,
\constant
{
UNIFIED
_
DIFF
}
, and
\constant
{
CONTEXT
_
DIFF
}
were added, and
\code
{
<BLANKLINE>
}
in expected output matches
an empty line in actual output by default
.
]
{
2.4
}
an empty line in actual output by default]
{
2.4
}
\subsection
{
Advanced Usage
}
...
...
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