Issue #25118: Fix a regression of Python 3.5.0 in os.waitpid() on Windows.

Add an unit test on os.waitpid()
This commit is contained in:
Victor Stinner 2015-09-15 10:11:03 +02:00
parent d64cfc215c
commit d3ffd32767
3 changed files with 10 additions and 2 deletions

View file

@ -2078,6 +2078,12 @@ class PidTests(unittest.TestCase):
# We are the parent of our subprocess
self.assertEqual(int(stdout), os.getpid())
def test_waitpid(self):
args = [sys.executable, '-c', 'pass']
pid = os.spawnv(os.P_NOWAIT, args[0], args)
status = os.waitpid(pid, 0)
self.assertEqual(status, (pid, 0))
# The introduction of this TestCase caused at least two different errors on
# *nix buildbots. Temporarily skip this to let the buildbots move along.