MCPcopy Index your code
hub / github.com/python/cpython / test_kill

Method test_kill

Lib/test/test_asyncio/test_subprocess.py:228–239  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

226 self.assertEqual(exitcode, 8)
227
228 def test_kill(self):
229 args = PROGRAM_BLOCKED
230 proc = self.loop.run_until_complete(
231 asyncio.create_subprocess_exec(*args)
232 )
233 proc.kill()
234 returncode = self.loop.run_until_complete(proc.wait())
235 if sys.platform == 'win32':
236 self.assertIsInstance(returncode, int)
237 # expect 1 but sometimes get 0
238 else:
239 self.assertEqual(-signal.SIGKILL, returncode)
240
241 def test_kill_issue43884(self):
242 if sys.platform == 'win32':

Callers

nothing calls this directly

Calls 5

assertIsInstanceMethod · 0.80
run_until_completeMethod · 0.45
killMethod · 0.45
waitMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected