mirror of
https://github.com/python/cpython.git
synced 2025-08-10 03:49:18 +00:00
[3.12] gh-119064: Use os_helper.FakePath instead of pathlib.Path in tests (GH-119065) (GH-119088)
(cherry picked from commit 0152dc4ff5
)
This commit is contained in:
parent
ed395f5c0e
commit
33a9f0ce65
19 changed files with 116 additions and 128 deletions
|
@ -662,15 +662,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')),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue