diff options
author | Kevin Follstad <kfollstad@gmail.com> | 2021-07-13 13:57:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-13 13:57:05 (GMT) |
commit | 48a5aa7f128caf5a46e4326c1fd285cd5fc8e59d (patch) | |
tree | 4e9596c99f45859fd2185cb9ecac8f4bc9cc15bf /Doc | |
parent | 2924bb1a566977efd45f335d6a94cd84d8047edf (diff) | |
download | cpython-48a5aa7f128caf5a46e4326c1fd285cd5fc8e59d.zip cpython-48a5aa7f128caf5a46e4326c1fd285cd5fc8e59d.tar.gz cpython-48a5aa7f128caf5a46e4326c1fd285cd5fc8e59d.tar.bz2 |
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.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/bz2.rst | 5 | ||||
-rw-r--r-- | Doc/library/configparser.rst | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Doc/library/bz2.rst b/Doc/library/bz2.rst index f6787ab..999892e 100644 --- a/Doc/library/bz2.rst +++ b/Doc/library/bz2.rst @@ -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") diff --git a/Doc/library/configparser.rst b/Doc/library/configparser.rst index b0c2a2c..2bb4259 100644 --- a/Doc/library/configparser.rst +++ b/Doc/library/configparser.rst @@ -46,6 +46,11 @@ can be customized by end users easily. import configparser +.. testcleanup:: + + import os + os.remove("example.ini") + Quick Start ----------- |