mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
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:
parent
2924bb1a56
commit
48a5aa7f12
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