summaryrefslogtreecommitdiff
path: root/Lib/test
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-09-15 10:11:03 +0200
committerVictor Stinner <victor.stinner@gmail.com>2015-09-15 10:11:03 +0200
commitd3ffd32767e1b05cc54e38e2d518b9b528ff8826 (patch)
tree699c732bc5a18642b559561a40fc298da1cd58d6 /Lib/test
parentd64cfc215c74c5ba1c97f23fde9291c2d50dc3a9 (diff)
downloadcpython-git-d3ffd32767e1b05cc54e38e2d518b9b528ff8826.tar.gz
Issue #25118: Fix a regression of Python 3.5.0 in os.waitpid() on Windows.
Add an unit test on os.waitpid()
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_os.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 245309ec05..bb717cc661 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -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.