diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-05-16 07:51:18 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-16 07:51:18 (GMT) |
| commit | 1dc7fcd8039ec09a49002827eb7f55b02741d927 (patch) | |
| tree | 6ce259bf7cd66eac2bbad1817aec0b7e769908da /Lib/test/test_asyncio/test_unix_events.py | |
| parent | bca7fb0e7af8c357d4327d76ed5393d8bfa21d92 (diff) | |
| download | cpython-1dc7fcd8039ec09a49002827eb7f55b02741d927.zip cpython-1dc7fcd8039ec09a49002827eb7f55b02741d927.tar.gz cpython-1dc7fcd8039ec09a49002827eb7f55b02741d927.tar.bz2 | |
[3.13] gh-119064: Use os_helper.FakePath instead of pathlib.Path in tests (GH-119065) (GH-119087)
(cherry picked from commit 0152dc4ff5534fa2948b95262e70ff6b202b9b99)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/test/test_asyncio/test_unix_events.py')
| -rw-r--r-- | Lib/test/test_asyncio/test_unix_events.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Lib/test/test_asyncio/test_unix_events.py b/Lib/test/test_asyncio/test_unix_events.py index 59ef9f5..9452213 100644 --- a/Lib/test/test_asyncio/test_unix_events.py +++ b/Lib/test/test_asyncio/test_unix_events.py @@ -6,7 +6,6 @@ import io import multiprocessing from multiprocessing.util import _cleanup_tests as multiprocessing_cleanup_tests import os -import pathlib import signal import socket import stat @@ -304,20 +303,20 @@ class SelectorEventLoopUnixSocketTests(test_utils.TestCase): self.loop.run_until_complete(srv.wait_closed()) @socket_helper.skip_unless_bind_unix_socket - def test_create_unix_server_pathlib(self): + def test_create_unix_server_pathlike(self): with test_utils.unix_socket_path() as path: - path = pathlib.Path(path) + path = os_helper.FakePath(path) srv_coro = self.loop.create_unix_server(lambda: None, path) srv = self.loop.run_until_complete(srv_coro) srv.close() self.loop.run_until_complete(srv.wait_closed()) - def test_create_unix_connection_pathlib(self): + def test_create_unix_connection_pathlike(self): with test_utils.unix_socket_path() as path: - path = pathlib.Path(path) + path = os_helper.FakePath(path) coro = self.loop.create_unix_connection(lambda: None, path) with self.assertRaises(FileNotFoundError): - # If pathlib.Path wasn't supported, the exception would be + # If path-like object weren't supported, the exception would be # different. self.loop.run_until_complete(coro) |
