| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
`Lib/test/test_doctest/` (GH-112109) (#114313)
gh-108303: Move all doctest related files and tests to `Lib/test/test_doctest/` (GH-112109)
|
|
|
|
|
|
|
|
| |
(GH-113393) (GH-113761)
It can only be a dict since Python 2.4.
(cherry picked from commit d99d8712253c3affc54cf7f6e71f161dea8347ce)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit b3c21265fa48a137a4c6a35e425b2b7f94f96cf4)
Co-authored-by: Daniel Wysocki <dwysocki@users.noreply.github.com>
|
|
|
|
|
|
| |
(#112404)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
(GH-109696) (#111078)
Co-authored-by: Unique-Usman <86585626+Unique-Usman@users.noreply.github.com>
Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
Co-authored-by: Jacob Coffee <jacob@z7x.org>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
|
|
|
|
|
| |
(cherry picked from commit 22860dbbc8b53954055847d2bb036af68b4ea409)
Co-authored-by: George Zhang <geetransit@gmail.com>
|
|
|
|
|
|
|
|
| |
(GH-94551) (GH-94557)
Discussion: https://discuss.python.org/t/slight-grammar-fix-throughout-adverbs-dont-need-hyphen/17021
(cherry picked from commit 3440d197a55800ecceea3e115e44b4262411359c)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
|
|
|
|
|
|
| |
Py>=3 (GH-92502) (GH-92962)
(cherry picked from commit 97b9c1096feff77a564787ef520cc7d4e1d1c45f)
|
|
|
|
|
|
|
|
|
|
|
| |
* Doc: Reveal doctest directives.
* Fix whitespace.
Co-authored-by: Julien Palard <julien@palard.fr>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit 7b024e3a3f77027f747da7580ed0a3ed2dec276a)
Co-authored-by: Davide Rizzo <sorcio@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
(GH-92467)
(cherry picked from commit 5639ea1ef9ba8452f81b61ad73152bd1bf1fd3a6)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Automerge-Triggered-By: GH:serhiy-storchaka
|
|
|
|
|
|
|
|
|
| |
* fix doctest doc examples for syntax errors
* updated examples to use TypeErrors
* fixed first sentence
* unneeded comma
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* "Return true/false" is replaced with "Return ``True``/``False``"
if the function actually returns a bool.
* Fixed formatting of some True and False literals (now in monospace).
* Replaced "True/False" with "true/false" if it can be not only bool.
* Replaced some 1/0 with True/False if it corresponds the code.
* "Returns <bool>" is replaced with "Return <bool>".
|
|
|
|
| |
Does no longer work since Sphinx moved the trim_doctest_flag option in
the configuration.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Replace
File "<stdin>", line 1, in ?
with
File "<stdin>", line 1, in <module>
|
| |
|
| |
|
|
|
|
| |
Patch by Julien Palard.
|
|
|
|
|
| |
Reformat header above separator line (added if missing) to a common format.
Patch by Yoni Lavi.
|
|\ |
|
| | |
|
|\ \
| |/ |
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
This makes doctest work like unittest: if the test case is empty, that
just means there are zero tests run, it's not an error. The existing
behavior was broken, since it only gave an error if there were *no*
docstrings, and zero tests run if there were docstrings but none of them
contained tests. So this makes it self-consistent as well.
Patch by Glenn Jones.
|
| |
|
|
|
|
|
|
|
|
| |
written in C.
As a part of this, a few doctests have been added to the builtins module
(on hex(), oct(), and bin()), a doctest has been fixed (hopefully on all
platforms) on float, and test_builtins now runs doctests in builtins.
|
|
|
|
|
|
| |
This provides a way to specify arbitrary doctest options when using
the CLI interface to process test files, just as one can when calling
testmod or testfile programmatically.
|
|
|
|
| |
Correction thanks to Joey Geralnik.
|
|
|
|
| |
Patch by me, most of the work (doc and tests) by Daniel Urban.
|
|
|
|
|
|
|
| |
"Option Flag" section.
The doctest examples that illustrate the use of doctest option flags
independent of doctest directives should not display doctest directives.
|
| |
|
|
|
|
| |
showing doctest directives only in the doctest docs.
|
|
|
|
|
| |
This changeset also applies the rendering workaround to the last remaining
example in the file that has a doctest directive that should be displayed.
|
|
|
|
| |
being stripped from code examples that are intended to illustrate those directives
|
| |
|
| |
|
|
|
|
|
|
|
| |
Also adds tests to verify the documented behavior (which is probably a bug, as
indicated in the added comments).
Patch by Chris Jerdonek.
|
|
|
|
| |
attribute and 'methods' where it denotes methods. Context should clarify usage.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
:option: is used to create a link to an option of python, not to mark
up any instance of any arbitrary command-line option. These were
changed to ````.
For modules which do have a command-line interface, lists of options
have been properly marked up with the program/cmdoption directives
combo. Options defined in such blocks can be linked to with :option:
later in the same file, they won’t link to an option of python.
Finally, the markup of command-line fragments in optparse.rst has
been cleaned to use ``x`` instead of ``"x"``, keeping that latter
form for actual Python strings.
Patch by Eli Bendersky and Éric Araujo.
|
| |
|
| |
|
|
|
|
| |
discovery.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81634 | r.david.murray | 2010-05-31 21:42:41 -0400 (Mon, 31 May 2010) | 2 lines
#7583: clarify discussion of hard tab expansion in doctests.
........
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80578 | nick.coghlan | 2010-04-29 00:29:06 +1000 (Thu, 29 Apr 2010) | 1 line
Issue 7490: make IGNORE_EXCEPTION_DETAIL also ignore details of the module containing the exception under test (original patch by Lennart Regebro)
........
|