diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-03-03 12:19:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-03 12:19:29 (GMT) |
commit | fbdd075c64a5229dfa26632cf1b2cf2361dc5003 (patch) | |
tree | a959f2fc206302c629b217ca811f305b7f5060be /Lib/test/test_subprocess.py | |
parent | 10fb1bf7766e7eb9500d328ddd1035e3f823fb57 (diff) | |
download | cpython-fbdd075c64a5229dfa26632cf1b2cf2361dc5003.zip cpython-fbdd075c64a5229dfa26632cf1b2cf2361dc5003.tar.gz cpython-fbdd075c64a5229dfa26632cf1b2cf2361dc5003.tar.bz2 |
[3.6] bpo-32964: Reuse a testing implementation of the path protocol in tests. (GH-5930). (GH-5958)
(cherry picked from commit b21d155f57d284aecf9092a9bd24258293965c2f)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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): |