mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-36814: ensure os.posix_spawn() handles None (GH-13144)
Fix an issue where os.posix_spawn() would incorrectly raise a TypeError when file_actions is None.
This commit is contained in:
parent
fce5ff1e18
commit
948ed8c96b
3 changed files with 11 additions and 1 deletions
|
@ -1550,6 +1550,15 @@ class _PosixSpawnMixin:
|
|||
with open(envfile) as f:
|
||||
self.assertEqual(f.read(), 'bar')
|
||||
|
||||
def test_none_file_actions(self):
|
||||
pid = self.spawn_func(
|
||||
self.NOOP_PROGRAM[0],
|
||||
self.NOOP_PROGRAM,
|
||||
os.environ,
|
||||
file_actions=None
|
||||
)
|
||||
self.assertEqual(os.waitpid(pid, 0), (pid, 0))
|
||||
|
||||
def test_empty_file_actions(self):
|
||||
pid = self.spawn_func(
|
||||
self.NOOP_PROGRAM[0],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue