()
| 1269 | time.sleep(1) |
| 1270 | |
| 1271 | async def main(): |
| 1272 | loop = asyncio.get_running_loop() |
| 1273 | loop.add_signal_handler(signal.SIGTERM, lambda *args: parent_handled.set()) |
| 1274 | |
| 1275 | process = ctx.Process(target=child_main) |
| 1276 | process.start() |
| 1277 | child_started.wait() |
| 1278 | os.kill(process.pid, signal.SIGTERM) |
| 1279 | process.join(timeout=support.SHORT_TIMEOUT) |
| 1280 | |
| 1281 | async def func(): |
| 1282 | await asyncio.sleep(0.1) |
| 1283 | return 42 |
| 1284 | |
| 1285 | # Test parent's loop is still functional |
| 1286 | self.assertEqual(await asyncio.create_task(func()), 42) |
| 1287 | |
| 1288 | asyncio.run(main()) |
| 1289 |
no test coverage detected