mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-114272: Fix or skip tests that fail due to spaces in paths (GH-114451)
This commit is contained in:
parent
d5c21c12c1
commit
c63c6142f9
4 changed files with 45 additions and 25 deletions
|
@ -4596,8 +4596,11 @@ class FDInheritanceTests(unittest.TestCase):
|
|||
with open(filename, "w") as fp:
|
||||
print(code, file=fp, end="")
|
||||
|
||||
cmd = [sys.executable, filename]
|
||||
exitcode = os.spawnl(os.P_WAIT, cmd[0], *cmd)
|
||||
executable = sys.executable
|
||||
cmd = [executable, filename]
|
||||
if os.name == "nt" and " " in cmd[0]:
|
||||
cmd[0] = f'"{cmd[0]}"'
|
||||
exitcode = os.spawnl(os.P_WAIT, executable, *cmd)
|
||||
self.assertEqual(exitcode, 0)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue