aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/_test_multiprocessing.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2024-05-16 10:25:10 +0300
committerGitHub <noreply@github.com>2024-05-16 10:25:10 +0300
commit0152dc4ff5534fa2948b95262e70ff6b202b9b99 (patch)
treecf311cb487a6f1956ab942d6356e5b5698659f85 /Lib/test/_test_multiprocessing.py
parent0142a2292c3d3bfa56a987d576a9678be0f56931 (diff)
downloadcpython-0152dc4ff5534fa2948b95262e70ff6b202b9b99.tar.gz
cpython-0152dc4ff5534fa2948b95262e70ff6b202b9b99.zip
gh-119064: Use os_helper.FakePath instead of pathlib.Path in tests (GH-119065)
Diffstat (limited to 'Lib/test/_test_multiprocessing.py')
-rw-r--r--Lib/test/_test_multiprocessing.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
index 46afdfca331..f126b6745dc 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
@@ -22,7 +22,6 @@ import logging
import subprocess
import struct
import operator
-import pathlib
import pickle
import weakref
import warnings
@@ -324,8 +323,9 @@ class _TestProcess(BaseTestCase):
self.skipTest(f'test not appropriate for {self.TYPE}')
paths = [
sys.executable, # str
- sys.executable.encode(), # bytes
- pathlib.Path(sys.executable) # os.PathLike
+ os.fsencode(sys.executable), # bytes
+ os_helper.FakePath(sys.executable), # os.PathLike
+ os_helper.FakePath(os.fsencode(sys.executable)), # os.PathLike bytes
]
for path in paths:
self.set_executable(path)