summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_logging.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2024-05-16 07:25:10 (GMT)
committerGitHub <noreply@github.com>2024-05-16 07:25:10 (GMT)
commit0152dc4ff5534fa2948b95262e70ff6b202b9b99 (patch)
treecf311cb487a6f1956ab942d6356e5b5698659f85 /Lib/test/test_logging.py
parent0142a2292c3d3bfa56a987d576a9678be0f56931 (diff)
downloadcpython-0152dc4ff5534fa2948b95262e70ff6b202b9b99.zip
cpython-0152dc4ff5534fa2948b95262e70ff6b202b9b99.tar.gz
cpython-0152dc4ff5534fa2948b95262e70ff6b202b9b99.tar.bz2
gh-119064: Use os_helper.FakePath instead of pathlib.Path in tests (GH-119065)
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r--Lib/test/test_logging.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index e651d96..97d7c9f 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -657,15 +657,15 @@ class HandlerTest(BaseTest):
self.assertFalse(h.shouldFlush(r))
h.close()
- def test_path_objects(self):
+ def test_pathlike_objects(self):
"""
- Test that Path objects are accepted as filename arguments to handlers.
+ Test that path-like objects are accepted as filename arguments to handlers.
See Issue #27493.
"""
fn = make_temp_file()
os.unlink(fn)
- pfn = pathlib.Path(fn)
+ pfn = os_helper.FakePath(fn)
cases = (
(logging.FileHandler, (pfn, 'w')),
(logging.handlers.RotatingFileHandler, (pfn, 'a')),