summaryrefslogtreecommitdiffstats
path: root/Doc/library/nntplib.rst
diff options
context:
space:
mode:
authorZachary Ware <zach@python.org>2022-07-30 22:21:08 (GMT)
committerGitHub <noreply@github.com>2022-07-30 22:21:08 (GMT)
commit82814624bf4049e4692a85d7973e62e469e6e5f5 (patch)
treeca62e01c813d3cfcda287dca6f95476e92101319 /Doc/library/nntplib.rst
parent9ec6abf6dc6ab622efda83a28d83d25ba129bbe2 (diff)
downloadcpython-82814624bf4049e4692a85d7973e62e469e6e5f5.zip
cpython-82814624bf4049e4692a85d7973e62e469e6e5f5.tar.gz
cpython-82814624bf4049e4692a85d7973e62e469e6e5f5.tar.bz2
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
Diffstat (limited to 'Doc/library/nntplib.rst')
-rw-r--r--Doc/library/nntplib.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/Doc/library/nntplib.rst b/Doc/library/nntplib.rst
index 2a996e4..5aad44d 100644
--- a/Doc/library/nntplib.rst
+++ b/Doc/library/nntplib.rst
@@ -14,6 +14,23 @@
.. deprecated:: 3.11
The :mod:`nntplib` module is deprecated (see :pep:`594` for details).
+.. testsetup::
+
+ import warnings
+ with warnings.catch_warnings():
+ warnings.simplefilter('ignore', category=DeprecationWarning)
+ import nntplib
+
+.. testcleanup::
+
+ try:
+ s.quit()
+ except NameError:
+ pass
+ import sys
+ # Force a warning if any other file imports nntplib
+ sys.modules.pop('nntplib')
+
--------------
This module defines the class :class:`NNTP` which implements the client side of