(self)
| 3425 | |
| 3426 | # read in amounts equal to TextIOWrapper._CHUNK_SIZE which is 128. |
| 3427 | def test_read_by_chunk(self): |
| 3428 | # make sure "\r\n" straddles 128 char boundary. |
| 3429 | txt = self.TextIOWrapper(self.BytesIO(b"A" * 127 + b"\r\nB"), encoding="utf-8") |
| 3430 | reads = "" |
| 3431 | while True: |
| 3432 | c = txt.read(128) |
| 3433 | if not c: |
| 3434 | break |
| 3435 | reads += c |
| 3436 | self.assertEqual(reads, "A"*127+"\nB") |
| 3437 | |
| 3438 | def test_writelines(self): |
| 3439 | l = ['ab', 'cd', 'ef'] |
nothing calls this directly
no test coverage detected