bpo-44514: Add doctest testcleanup for configparser and bz2 (#26909)

Add testcleanup section to configparser and bz2 documentation which
removes temporary files created in the filesystem when 'make doctest'
is run.
This commit is contained in:
Kevin Follstad 2021-07-13 06:57:05 -07:00 committed by GitHub
parent 2924bb1a56
commit 48a5aa7f12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View file

@ -325,3 +325,8 @@ Writing and reading a bzip2-compressed file in binary mode:
... content = f.read()
>>> content == data # Check equality to original object after round-trip
True
.. testcleanup::
import os
os.remove("myfile.bz2")

View file

@ -46,6 +46,11 @@ can be customized by end users easily.
import configparser
.. testcleanup::
import os
os.remove("example.ini")
Quick Start
-----------