diff options
Diffstat (limited to 'Lib/test/test_subprocess.py')
-rw-r--r-- | Lib/test/test_subprocess.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 5c6429c..aca1411 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -16,6 +16,7 @@ import select import shutil import gc import textwrap +from test.support import FakePath try: import ctypes @@ -363,12 +364,7 @@ class ProcessTestCase(BaseTestCase): def test_cwd_with_pathlike(self): temp_dir = tempfile.gettempdir() temp_dir = self._normalize_cwd(temp_dir) - - class _PathLikeObj: - def __fspath__(self): - return temp_dir - - self._assert_cwd(temp_dir, sys.executable, cwd=_PathLikeObj()) + self._assert_cwd(temp_dir, sys.executable, cwd=FakePath(temp_dir)) @unittest.skipIf(mswindows, "pending resolution of issue #15533") def test_cwd_with_relative_arg(self): |