mirror of
https://github.com/python/cpython.git
synced 2025-08-09 19:38:42 +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
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue