summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_logging.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2021-04-28 13:47:10 (GMT)
committerGitHub <noreply@github.com>2021-04-28 13:47:10 (GMT)
commitfe52eb62191e640e720d184a9a1a04e965b8a062 (patch)
treebbfe56fcdd433643e4b3e4dcda419abdf36e9682 /Lib/test/test_logging.py
parent32c5a174445ec93747240cd8472012276ed27acf (diff)
downloadcpython-fe52eb62191e640e720d184a9a1a04e965b8a062.zip
cpython-fe52eb62191e640e720d184a9a1a04e965b8a062.tar.gz
cpython-fe52eb62191e640e720d184a9a1a04e965b8a062.tar.bz2
bpo-43961: Fix test_logging.test_namer_rotator_inheritance() (GH-25684)
Fix test_logging.test_namer_rotator_inheritance() on Windows: use os.replace() rather than os.rename().
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r--Lib/test/test_logging.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index bb31e29..1d061e4 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -5219,7 +5219,7 @@ class RotatingFileHandlerTest(BaseFileTest):
def rotator(self, source, dest):
if os.path.exists(source):
- os.rename(source, dest + ".rotated")
+ os.replace(source, dest + ".rotated")
rh = HandlerWithNamerAndRotator(
self.fn, encoding="utf-8", backupCount=2, maxBytes=1)