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

Method test_terminate

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

Source from the content-addressed store, hash-verified

266 self.assertEqual(-signal.SIGKILL, returncode)
267
268 def test_terminate(self):
269 args = PROGRAM_BLOCKED
270 proc = self.loop.run_until_complete(
271 asyncio.create_subprocess_exec(*args)
272 )
273 proc.terminate()
274 returncode = self.loop.run_until_complete(proc.wait())
275 if sys.platform == 'win32':
276 self.assertIsInstance(returncode, int)
277 # expect 1 but sometimes get 0
278 else:
279 self.assertEqual(-signal.SIGTERM, returncode)
280
281 @unittest.skipIf(sys.platform == 'win32', "Don't have SIGHUP")
282 def test_send_signal(self):

Callers

nothing calls this directly

Calls 5

assertIsInstanceMethod · 0.80
run_until_completeMethod · 0.45
terminateMethod · 0.45
waitMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected