summaryrefslogtreecommitdiffstats
path: root/Doc/library/doctest.rst
Commit message (Collapse)AuthorAgeFilesLines
* [3.11] gh-108303: Move all doctest related files and tests to ↵Nikita Sobolev2024-01-191-1/+1
| | | | | `Lib/test/test_doctest/` (GH-112109) (#114313) gh-108303: Move all doctest related files and tests to `Lib/test/test_doctest/` (GH-112109)
* [3.11] gh-113360: Fix the documentation of module's attribute __test__ ↵Miss Islington (bot)2024-01-051-3/+3
| | | | | | | | (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>
* [3.11] Fixing typo in DocTestRunner docs (GH-112326) (GH-113098)Miss Islington (bot)2023-12-141-1/+1
| | | | | (cherry picked from commit b3c21265fa48a137a4c6a35e425b2b7f94f96cf4) Co-authored-by: Daniel Wysocki <dwysocki@users.noreply.github.com>
* [3.11] gh-101100 : Fix Sphinx warnings in `library/doctest.rst` (GH-112399) ↵Hugo van Kemenade2023-11-251-20/+27
| | | | | | (#112404) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.11] gh-109510: Clearly explain "Which Docstrings Are Examined" ↵Miss Islington (bot)2023-10-191-3/+24
| | | | | | | | | | (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>
* doc: Remove backslashes in doctest grammar docs (GH-29346)Miss Islington (bot)2022-11-271-3/+3
| | | | | (cherry picked from commit 22860dbbc8b53954055847d2bb036af68b4ea409) Co-authored-by: George Zhang <geetransit@gmail.com>
* Docs: remove redundant "adverb-adjective" hyphens from compound modifiers ↵Miss Islington (bot)2022-07-051-2/+2
| | | | | | | | (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>
* gh-92417: Update docs and examples of doctest.IGNORE_EXCEPTION_DETAIL for ↵Miss Islington (bot)2022-05-191-27/+21
| | | | | | Py>=3 (GH-92502) (GH-92962) (cherry picked from commit 97b9c1096feff77a564787ef520cc7d4e1d1c45f)
* gh-80856: doc: reveal doctest directives (GH-92318)Miss Islington (bot)2022-05-081-17/+37
| | | | | | | | | | | * 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>
* [3.11] gh-92417: `doctest` docs: remove references to Python <3.6 (GH-92420) ↵Miss Islington (bot)2022-05-081-9/+0
| | | | | | | | | | (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 (GH-28486)andrei kulakov2021-09-291-11/+10
| | | | | | | | | * fix doctest doc examples for syntax errors * updated examples to use TypeErrors * fixed first sentence * unneeded comma
* bpo-42843: Keep Sphinx 1.8 and Sphinx 2 compatibility (GH-24282)Julien Palard2021-01-251-37/+17
|
* bpo-36675: Doc: Reveal doctest directives (GH-23620)Julien Palard2020-12-151-17/+37
|
* bpo-38738: Fix formatting of True and False. (GH-17083)Serhiy Storchaka2019-11-121-1/+1
| | | | | | | | | * "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>".
* bpo-36675: Remove obsolete code. (GH-16024)Julien Palard2019-09-121-2/+0
| | | | Does no longer work since Sphinx moved the trim_doctest_flag option in the configuration.
* bpo-35054: Add yet more index entries for symbols. (GH-10121)Serhiy Storchaka2018-10-281-4/+4
|
* bpo-35054: Add more index entries for symbols. (GH-10064)Serhiy Storchaka2018-10-261-0/+12
|
* bpo-34839: Add a 'before 3.6' in the section 'warnings' of doctest (GH-9736)Stéphane Wirtel2018-10-201-7/+11
|
* bpo-28315: Improve code examples in docs (GH-1372)UltimateCoder2017-05-031-3/+3
| | | | | | Replace File "<stdin>", line 1, in ? with File "<stdin>", line 1, in <module>
* Issue #29371: Clarify bitwise OR operation in doctest option flags.Mariatta Wijaya2017-02-071-11/+13
|
* Issue #19795: Mark up None as literal text.Serhiy Storchaka2016-10-191-2/+2
|
* Issue #26462: Doc: reduce literal_block warnings, fix syntax highlighting.Martin Panter2016-07-261-4/+12
| | | | Patch by Julien Palard.
* Issue #22558: Add remaining doc links to source code for Python-coded modules.Terry Jan Reedy2016-06-111-0/+4
| | | | | Reformat header above separator line (added if missing) to a common format. Patch by Yoni Lavi.
* Issue24756: clarify usage of run_docstring_examples()Ethan Furman2015-09-181-7/+23
|\
| * Issue24756: clarify usage of run_docstring_examples()Ethan Furman2015-09-181-7/+23
| |
* | merge with 3.4Georg Brandl2014-10-061-3/+3
|\ \ | |/
| * Closes #12148: clarify "or's together option flags" in doctest docs.Georg Brandl2014-10-061-3/+3
| |
* | #15916: if there are no docstrings, make empty suite, not an error.R David Murray2014-04-151-9/+3
|/ | | | | | | | | | 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.
* Fix a few scoping issues with versionadded/versionchanged directives.Georg Brandl2014-03-241-1/+2
|
* Issue #3158: doctest can now find doctests in functions and methodsZachary Ware2013-11-241-3/+6
| | | | | | | | 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.
* #11390: convert doctest CLI to argparse and add -o and -f options.R David Murray2013-06-231-1/+7
| | | | | | 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.
* #16522: s/always 1/at most 1/.R David Murray2012-11-221-2/+2
| | | | Correction thanks to Joey Geralnik.
* #16522: Add FAIL_FAST flag to doctest.R David Murray2012-11-211-0/+10
| | | | Patch by me, most of the work (doc and tests) by Daniel Urban.
* Issue #12947: Remove doctest directives from the doctest examples in the ↵Chris Jerdonek2012-10-101-3/+3
| | | | | | | "Option Flag" section. The doctest examples that illustrate the use of doctest option flags independent of doctest directives should not display doctest directives.
* Missed one instance of code-block:: text highlighting to revert.Georg Brandl2012-10-101-3/+1
|
* Issue #12947: revert earlier workaround and use a monkey-patch to enable ↵Georg Brandl2012-10-101-23/+8
| | | | showing doctest directives only in the doctest docs.
* Issue #12947: Divide doctest "Option Flags and Directives" section into two.Chris Jerdonek2012-10-101-27/+39
| | | | | This changeset also applies the rendering workaround to the last remaining example in the file that has a doctest directive that should be displayed.
* Issue #12947: Better workaround for the problem with doctest directives ↵Nick Coghlan2012-10-031-10/+20
| | | | being stripped from code examples that are intended to illustrate those directives
* Issue #12947: Add a note to doctest until the example rendering is fixedNick Coghlan2012-10-031-0/+8
|
* Fix a few quotes/backslashes.Ezio Melotti2012-09-201-1/+1
|
* #14649: clarify DocTestSuite error when there are no docstrings.R David Murray2012-09-101-0/+10
| | | | | | | Also adds tests to verify the documented behavior (which is probably a bug, as indicated in the added comments). Patch by Chris Jerdonek.
* issue10403 - Let's not use members anymore. Use 'attribute' where it denotes ↵Senthil Kumaran2011-07-041-10/+9
| | | | attribute and 'methods' where it denotes methods. Context should clarify usage.
* #10698: fix typo in example.R. David Murray2010-12-131-1/+1
|
* Fix usage of :option: in the docs (#9312).Éric Araujo2010-11-181-5/+5
| | | | | | | | | | | | | | | | | :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.
* Consistency check for versionadded/changed directives.Georg Brandl2010-08-171-2/+2
|
* Terminology fix: exceptions are raised, except in generator.throw().Georg Brandl2010-08-031-4/+4
|
* #8564: update docs on integrating doctest/unittest with unittest(2) test ↵Georg Brandl2010-07-101-8/+6
| | | | discovery.
* Remove versionadded accidentally introduced by r82008.R. David Murray2010-06-161-4/+0
|
* Merged revisions 81634 via svnmerge fromR. David Murray2010-06-151-6/+17
| | | | | | | | | | 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. ........
* Merged revisions 80578 via svnmerge fromNick Coghlan2010-06-121-11/+29
| | | | | | | | | | 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) ........