(self)
| 1523 | self.assertEqual([b"abcdef", b"ghi", b"x"*chunk_size], buf._write_stack) |
| 1524 | |
| 1525 | def test_issue119506(self): |
| 1526 | chunk_size = 8192 |
| 1527 | |
| 1528 | class MockIO(self.MockRawIO): |
| 1529 | written = False |
| 1530 | def write(self, data): |
| 1531 | if not self.written: |
| 1532 | self.written = True |
| 1533 | t.write("middle") |
| 1534 | return super().write(data) |
| 1535 | |
| 1536 | buf = MockIO() |
| 1537 | t = self.TextIOWrapper(buf) |
| 1538 | t.write("abc") |
| 1539 | t.write("def") |
| 1540 | # writing data which size >= chunk_size cause flushing buffer before write. |
| 1541 | t.write("g" * chunk_size) |
| 1542 | t.flush() |
| 1543 | |
| 1544 | self.assertEqual([b"abcdef", b"middle", b"g"*chunk_size], |
| 1545 | buf._write_stack) |
| 1546 | |
| 1547 | def test_issue142594(self): |
| 1548 | wrapper = None |
nothing calls this directly
no test coverage detected