diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-04-28 08:28:15 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-28 17:28:15 +0200 |
commit | 629ef0fb9cad6ac340d3be884af7b47fb393ae99 (patch) | |
tree | e537763753224f8745949a8ae27e142f077f9aa4 /Lib/test/test_logging.py | |
parent | 2dc6b1789ec86dc80ea290fe33edd61140e47f6f (diff) | |
download | cpython-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.py | 2 |
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) |