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()
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()