From 629ef0fb9cad6ac340d3be884af7b47fb393ae99 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Wed, 28 Apr 2021 08:28:15 -0700 Subject: 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 Co-authored-by: Victor Stinner --- Lib/test/test_logging.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/test/test_logging.py') 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) -- cgit v1.2.1