Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async def test_process(self):
p = amp.Process(target=sleepypid, name="test_process")
p.start()
self.assertEqual(p.name, "test_process")
self.assertTrue(p.pid)
self.assertTrue(p.is_alive())
await p.join()
self.assertFalse(p.is_alive())
async def test_process_timeout(self):
p = amp.Process(target=sleepypid, args=(1,))
p.start()
with self.assertRaises(asyncio.TimeoutError):
await p.join(timeout=0.01)