summaryrefslogtreecommitdiffstats
path: root/Lib/test/support
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-12-07 08:56:39 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-12-07 08:56:39 (GMT)
commit028ace1ccbabd40f6491b0337054a341be47a39d (patch)
tree8a404a9628b4ad565eaa49d2669f57b1b5c635e1 /Lib/test/support
parente5031260741e18968faedd19c2ac617ddc8f5c32 (diff)
downloadcpython-028ace1ccbabd40f6491b0337054a341be47a39d.zip
cpython-028ace1ccbabd40f6491b0337054a341be47a39d.tar.gz
cpython-028ace1ccbabd40f6491b0337054a341be47a39d.tar.bz2
Issue #28847: dbm.dumb now supports reading read-only files and no longer
writes the index file when it is not changed.
Diffstat (limited to 'Lib/test/support')
-rw-r--r--Lib/test/support/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index 97828af..698f503 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -359,9 +359,9 @@ if sys.platform.startswith("win"):
mode = 0
if stat.S_ISDIR(mode):
_waitfor(_rmtree_inner, fullname, waitall=True)
- _force_run(path, os.rmdir, fullname)
+ _force_run(fullname, os.rmdir, fullname)
else:
- _force_run(path, os.unlink, fullname)
+ _force_run(fullname, os.unlink, fullname)
_waitfor(_rmtree_inner, path, waitall=True)
_waitfor(lambda p: _force_run(p, os.rmdir, p), path)
else:
@@ -933,7 +933,7 @@ def temp_dir(path=None, quiet=False):
yield path
finally:
if dir_created:
- shutil.rmtree(path)
+ rmtree(path)
@contextlib.contextmanager
def change_cwd(path, quiet=False):