summaryrefslogtreecommitdiffstats
path: root/Lib/test/fork_wait.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-03-31 19:46:40 (GMT)
committerGitHub <noreply@github.com>2020-03-31 19:46:40 (GMT)
commit27c6231f5827fe17c6cb6f097391931f30b511ec (patch)
treeb0f36e377cd2f3a0c7f2b9c08e26eaa51047fdb5 /Lib/test/fork_wait.py
parent278c1e159c970da6cd6683d18c6211f5118674cc (diff)
downloadcpython-27c6231f5827fe17c6cb6f097391931f30b511ec.zip
cpython-27c6231f5827fe17c6cb6f097391931f30b511ec.tar.gz
cpython-27c6231f5827fe17c6cb6f097391931f30b511ec.tar.bz2
bpo-40094: Enhance fork and wait tests (GH-19259)
* test_fork1: remove duplicated wait_impl() method: reuse fork_wait.py implementation instead. * Use exit code different than 0 to ensure that we executed the expected code path.
Diffstat (limited to 'Lib/test/fork_wait.py')
-rw-r--r--Lib/test/fork_wait.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/fork_wait.py b/Lib/test/fork_wait.py
index 8c17755..249b5e9 100644
--- a/Lib/test/fork_wait.py
+++ b/Lib/test/fork_wait.py
@@ -43,8 +43,8 @@ class ForkWait(unittest.TestCase):
except OSError:
pass
- def wait_impl(self, cpid):
- support.wait_process(cpid, exitcode=0)
+ def wait_impl(self, cpid, *, exitcode):
+ support.wait_process(cpid, exitcode=exitcode)
def test_wait(self):
for i in range(NUM_THREADS):
@@ -79,4 +79,4 @@ class ForkWait(unittest.TestCase):
os._exit(n)
else:
# Parent
- self.wait_impl(cpid)
+ self.wait_impl(cpid, exitcode=0)