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

Method send_signal

Lib/test/test_asyncio/test_subprocess.py:297–304  ·  view source on GitHub ↗
(proc)

Source from the content-addressed store, hash-verified

295 )
296
297 async def send_signal(proc):
298 # basic synchronization to wait until the program is sleeping
299 line = await proc.stdout.readline()
300 self.assertEqual(line, b'sleeping\n')
301
302 proc.send_signal(signal.SIGHUP)
303 returncode = await proc.wait()
304 return returncode
305
306 returncode = self.loop.run_until_complete(send_signal(proc))
307 self.assertEqual(-signal.SIGHUP, returncode)

Calls 3

readlineMethod · 0.45
assertEqualMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected