Doctest cleanups (GH-95436)

* GHA: Don't hide doctest output

* Enable doctests in math.rst

* Squash warnings in nntplib.rst doctests

* Squash warning in turtle.rst doctest

* Squash warnings in whatsnew/3.2.rst doctests

* Treat warnings as errors in Doc/ doctests
This commit is contained in:
Zachary Ware 2022-07-30 17:21:08 -05:00 committed by GitHub
parent 9ec6abf6dc
commit 82814624bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 29 additions and 7 deletions

View file

@ -322,7 +322,7 @@ aspects that are visible to the programmer:
* The tag that is unique to each interpreter is accessible from the :mod:`imp`
module:
>>> import imp
>>> import imp # doctest: +SKIP
>>> imp.get_tag() # doctest: +SKIP
'cpython-32'
@ -330,7 +330,7 @@ aspects that are visible to the programmer:
be smarter. It is no longer sufficient to simply strip the "c" from a ".pyc"
filename. Instead, use the new functions in the :mod:`imp` module:
>>> imp.source_from_cache('c:/py32/lib/__pycache__/collections.cpython-32.pyc')
>>> imp.source_from_cache('c:/py32/lib/__pycache__/collections.cpython-32.pyc') # doctest: +SKIP
'c:/py32/lib/collections.py'
>>> imp.cache_from_source('c:/py32/lib/collections.py') # doctest: +SKIP
'c:/py32/lib/__pycache__/collections.cpython-32.pyc'