(self)
| 4190 | self.assertEqual([b"abcdef", b"ghi", b"x"*chunk_size], buf._write_stack) |
| 4191 | |
| 4192 | def test_issue119506(self): |
| 4193 | chunk_size = 8192 |
| 4194 | |
| 4195 | class MockIO(self.MockRawIO): |
| 4196 | written = False |
| 4197 | def write(self, data): |
| 4198 | if not self.written: |
| 4199 | self.written = True |
| 4200 | t.write("middle") |
| 4201 | return super().write(data) |
| 4202 | |
| 4203 | buf = MockIO() |
| 4204 | t = self.TextIOWrapper(buf) |
| 4205 | t.write("abc") |
| 4206 | t.write("def") |
| 4207 | # writing data which size >= chunk_size cause flushing buffer before write. |
| 4208 | t.write("g" * chunk_size) |
| 4209 | t.flush() |
| 4210 | |
| 4211 | self.assertEqual([b"abcdef", b"middle", b"g"*chunk_size], |
| 4212 | buf._write_stack) |
| 4213 | |
| 4214 | def test_issue142594(self): |
| 4215 | wrapper = None |
nothing calls this directly
no test coverage detected