Issue #27209: Fix doctests in Doc/library/email*.rst
Patch by Jelle Zijlstra.
diff --git a/Doc/library/email.iterators.rst b/Doc/library/email.iterators.rst
index f3e9e18..d53ab33 100644
--- a/Doc/library/email.iterators.rst
+++ b/Doc/library/email.iterators.rst
@@ -50,9 +50,9 @@
.. testsetup::
- >>> import email
- >>> from email.iterators import _structure
- >>> somefile = open('Lib/test/test_email/data/msg_02.txt')
+ import email
+ from email.iterators import _structure
+ somefile = open('../Lib/test/test_email/data/msg_02.txt')
.. doctest::
@@ -74,9 +74,9 @@
text/plain
text/plain
- .. testsetup::
+ .. testcleanup::
- >>> somefile.close()
+ somefile.close()
Optional *fp* is a file-like object to print the output to. It must be
suitable for Python's :func:`print` function. *level* is used internally.