There was an error while loading. Please reload this page.
1 parent 32c5a17 commit fe52eb6Copy full SHA for fe52eb6
2 files changed
Lib/test/test_logging.py
@@ -5219,7 +5219,7 @@ def namer(self, name):
5219
5220
def rotator(self, source, dest):
5221
if os.path.exists(source):
5222
- os.rename(source, dest + ".rotated")
+ os.replace(source, dest + ".rotated")
5223
5224
rh = HandlerWithNamerAndRotator(
5225
self.fn, encoding="utf-8", backupCount=2, maxBytes=1)
Misc/NEWS.d/next/Tests/2021-04-28-13-21-52.bpo-43961.gNchls.rst
@@ -0,0 +1,2 @@
1
+Fix test_logging.test_namer_rotator_inheritance() on Windows: use
2
+:func:`os.replace` rather than :func:`os.rename`. Patch by Victor Stinner.
0 commit comments