Ejemplo n.º 1
0
 async def execute():
     p = await subprocess.create_subprocess_exec(
         support.FakePath(sys.executable), '-c', 'pass')
     await p.wait()
     p = await subprocess.create_subprocess_exec(
         sys.executable, '-c', 'pass', support.FakePath('.'))
     await p.wait()
Ejemplo n.º 2
0
        async def execute():
            watcher = mock.create_authspec(asyncio.AbstractChildWatcher)
            watcher.is_active.return_value = False
            asyncio.set_child_watcher(watcher)

            with self.assertRaises(RuntimeError):
                await subprocess.create_subprocess_exec(
                    support.FakePath(sys.executable), '-c', 'pass')

            watcher.add_child_handler.assert_not_called()