mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
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:
parent
4a0f1df952
commit
f514addfbc
2 changed files with 10 additions and 0 deletions
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -46,6 +46,11 @@ can be customized by end users easily.
|
|||
|
||||
import configparser
|
||||
|
||||
.. testcleanup::
|
||||
|
||||
import os
|
||||
os.remove("example.ini")
|
||||
|
||||
|
||||
Quick Start
|
||||
-----------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue