(self)
| 765 | |
| 766 | # read in amounts equal to TextIOWrapper._CHUNK_SIZE which is 128. |
| 767 | def test_read_by_chunk(self): |
| 768 | # make sure "\r\n" straddles 128 char boundary. |
| 769 | txt = self.TextIOWrapper(self.BytesIO(b"A" * 127 + b"\r\nB"), encoding="utf-8") |
| 770 | reads = "" |
| 771 | while True: |
| 772 | c = txt.read(128) |
| 773 | if not c: |
| 774 | break |
| 775 | reads += c |
| 776 | self.assertEqual(reads, "A"*127+"\nB") |
| 777 | |
| 778 | def test_writelines(self): |
| 779 | l = ['ab', 'cd', 'ef'] |
nothing calls this directly
no test coverage detected