(self)
| 695 | self.open(os_helper.TESTFN, 'w', encoding="utf-8", newline='invalid') |
| 696 | |
| 697 | def test_buffered_readinto_mixin(self): |
| 698 | # Test the implementation provided by BufferedIOBase |
| 699 | class Stream(self.BufferedIOBase): |
| 700 | def read(self, size): |
| 701 | return b"12345" |
| 702 | read1 = read |
| 703 | stream = Stream() |
| 704 | for method in ("readinto", "readinto1"): |
| 705 | with self.subTest(method): |
| 706 | buffer = byteslike(5) |
| 707 | self.assertEqual(getattr(stream, method)(buffer), 5) |
| 708 | self.assertEqual(bytes(buffer), b"12345") |
| 709 | |
| 710 | def test_fspath_support(self): |
| 711 | def check_path_succeeds(path): |
nothing calls this directly
no test coverage detected