Test reading data that exceeds 64KB (triggers the bug without fix)
(self)
| 120 | assert len(result) == 65536 |
| 121 | |
| 122 | def test_read_exact_exceeds_64kb(self): |
| 123 | """Test reading data that exceeds 64KB (triggers the bug without fix)""" |
| 124 | # 80KB - larger than typical pipe buffer |
| 125 | content = b"z" * 81920 |
| 126 | # Simulate reading with 64KB limit (macOS pipe buffer) |
| 127 | mock_stream = ShortReadStream(content, chunk_size=65536) |
| 128 | |
| 129 | process = MockProcess() |
| 130 | process.stdout = mock_stream |
| 131 | |
| 132 | client = JsonRpcClient(process) |
| 133 | result = client._read_exact(len(content)) |
| 134 | |
| 135 | assert result == content |
| 136 | assert len(result) == 81920 |
| 137 | |
| 138 | def test_read_exact_empty_stream_raises_eof(self): |
| 139 | """Test that reading from closed stream raises EOFError""" |
nothing calls this directly
no test coverage detected