(self)
| 1072 | self.assertEqual(pair.read1(), b"def") |
| 1073 | |
| 1074 | def test_readinto(self): |
| 1075 | for method in ("readinto", "readinto1"): |
| 1076 | with self.subTest(method): |
| 1077 | pair = self.tp(self.BytesIO(b"abcdef"), self.MockRawIO()) |
| 1078 | |
| 1079 | data = byteslike(b'\0' * 5) |
| 1080 | self.assertEqual(getattr(pair, method)(data), 5) |
| 1081 | self.assertEqual(bytes(data), b"abcde") |
| 1082 | |
| 1083 | # gh-138720: C BufferedRWPair would destruct in a bad order resulting in |
| 1084 | # an unraisable exception. |
| 1085 | support.gc_collect() |
| 1086 | |
| 1087 | def test_write(self): |
| 1088 | w = self.MockRawIO() |
nothing calls this directly
no test coverage detected