mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Fix the test_subprocess failure when sys.executable is meaningless: '' or a directory.
It does not fix #7774.
This commit is contained in:
parent
85677617d5
commit
e58d91c8f0
2 changed files with 4 additions and 3 deletions
|
@ -135,7 +135,7 @@ class ProcessTestCase(unittest.TestCase):
|
|||
self.assertEqual(p.stderr, None)
|
||||
|
||||
def test_executable_with_cwd(self):
|
||||
python_dir = os.path.dirname(os.path.realpath(sys.executable))
|
||||
python_dir = os.path.realpath(os.path.dirname(sys.executable))
|
||||
p = subprocess.Popen(["somethingyoudonthave", "-c",
|
||||
"import sys; sys.exit(47)"],
|
||||
executable=sys.executable, cwd=python_dir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue