()
| 438 | def test_empty_input(self): |
| 439 | |
| 440 | async def empty_input(): |
| 441 | code = 'import sys; data = sys.stdin.read(); print(len(data))' |
| 442 | proc = await asyncio.create_subprocess_exec( |
| 443 | sys.executable, '-c', code, |
| 444 | stdin=asyncio.subprocess.PIPE, |
| 445 | stdout=asyncio.subprocess.PIPE, |
| 446 | stderr=asyncio.subprocess.PIPE, |
| 447 | close_fds=False, |
| 448 | ) |
| 449 | stdout, stderr = await proc.communicate(b'') |
| 450 | exitcode = await proc.wait() |
| 451 | return (stdout, exitcode) |
| 452 | |
| 453 | output, exitcode = self.loop.run_until_complete(empty_input()) |
| 454 | self.assertEqual(output.rstrip(), b'0') |
nothing calls this directly
no test coverage detected