|
|
|
parse(self,
string,
name=' <string> ' )
Divide the given string into examples and intervening text,
and return them as a list of alternating Examples and strings. |
|
|
|
get_doctest(self,
string,
globs,
name,
filename,
lineno)
Extract all doctest examples from the given string, and
collect them into a DocTest object. |
|
|
|
get_examples(self,
string,
name=' <string> ' )
Extract all doctest examples from the given string, and return
them as a list of Example objects. |
|
|
|
_parse_example(self,
m,
name,
lineno)
Given a regular expression match from \_EXAMPLE\_RE (m ),
return a pair (source, want) , where source is the matched
example's source code (with prompts and indentation stripped);
and want is the example's expected output (with indentation
stripped). |
|
|
|
_find_options(self,
source,
name,
lineno)
Return a dictionary containing option overrides extracted from
option directives in the given source string. |
|
|
|
_min_indent(self,
s)
Return the minimum indentation of any non-blank line in s |
|
|
|
_check_prompt_blank(self,
lines,
indent,
name,
lineno)
Given the lines of a source string (including prompts and
leading indentation), check to make sure that every prompt is
followed by a space character. |
|
|
|
_check_prefix(self,
lines,
prefix,
name,
lineno)
Check that every line in the given list starts with the given
prefix; if any line does not, then raise a ValueError. |
|
|