summaryrefslogtreecommitdiff
path: root/Lib/test/test_logging.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-04-28 08:28:15 -0700
committerGitHub <noreply@github.com>2021-04-28 17:28:15 +0200
commit629ef0fb9cad6ac340d3be884af7b47fb393ae99 (patch)
treee537763753224f8745949a8ae27e142f077f9aa4 /Lib/test/test_logging.py
parent2dc6b1789ec86dc80ea290fe33edd61140e47f6f (diff)
downloadcpython-git-629ef0fb9cad6ac340d3be884af7b47fb393ae99.tar.gz
bpo-43961: Fix test_logging.test_namer_rotator_inheritance() (GH-25684) (GH-25688)
Fix test_logging.test_namer_rotator_inheritance() on Windows: use os.replace() rather than os.rename(). (cherry picked from commit fe52eb62191e640e720d184a9a1a04e965b8a062) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
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 1760e241d8..8a3ffb5584 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -5102,7 +5102,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, backupCount=2, maxBytes=1)