()
| 178 | stdin_writer.close() |
| 179 | |
| 180 | async def run() -> Tuple[int, bytes, bytes]: |
| 181 | proc = await asyncio.create_subprocess_exec( |
| 182 | *args, |
| 183 | stdin=stdin, |
| 184 | stdout=asyncio.subprocess.PIPE, |
| 185 | stderr=asyncio.subprocess.PIPE, |
| 186 | cwd=self.cwd, |
| 187 | env=env, |
| 188 | ) |
| 189 | assert proc.stdout is not None |
| 190 | assert proc.stderr is not None |
| 191 | _, out, err, _ = await asyncio.gather( |
| 192 | feed_input(proc.stdin), |
| 193 | process_stream(proc.stdout, stdout, sys.stdout), |
| 194 | process_stream(proc.stderr, stderr, sys.stderr), |
| 195 | proc.wait(), |
| 196 | ) |
| 197 | assert proc.returncode is not None |
| 198 | return (proc.returncode, out, err) |
| 199 | |
| 200 | loop = asyncio.get_event_loop() |
| 201 | returncode, out, err = loop.run_until_complete(run()) |
no outgoing calls
no test coverage detected