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

Add testcleanup section to configparser and bz2 documentation which
removes temporary files created in the filesystem when 'make doctest'
is run.
(cherry picked from commit 48a5aa7f12)

Co-authored-by: Kevin Follstad <kfollstad@gmail.com>
This commit is contained in:
Miss Islington (bot) 2021-07-13 07:34:10 -07:00 committed by GitHub
parent 4a0f1df952
commit f514addfbc
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
-----------