summaryrefslogtreecommitdiff
path: root/Doc/library/doctest.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/doctest.rst')
-rw-r--r--Doc/library/doctest.rst12
1 files changed, 3 insertions, 9 deletions
diff --git a/Doc/library/doctest.rst b/Doc/library/doctest.rst
index ea6e1b5481..9f7d12c626 100644
--- a/Doc/library/doctest.rst
+++ b/Doc/library/doctest.rst
@@ -1053,15 +1053,9 @@ from text files and modules with doctests:
This function uses the same search technique as :func:`testmod`.
- .. note::
- Unlike :func:`testmod` and :class:`DocTestFinder`, this function raises
- a :exc:`ValueError` if *module* contains no docstrings. You can prevent
- this error by passing a :class:`DocTestFinder` instance as the
- *test_finder* argument with its *exclude_empty* keyword argument set
- to ``False``::
-
- >>> finder = doctest.DocTestFinder(exclude_empty=False)
- >>> suite = doctest.DocTestSuite(test_finder=finder)
+ .. versionchanged:: 3.5
+ :func:`DocTestSuite` returns an empty :class:`unittest.TestSuite` if *module*
+ contains no docstrings instead of raising :exc:`ValueError`.
Under the covers, :func:`DocTestSuite` creates a :class:`unittest.TestSuite` out