(self)
| 1085 | support.gc_collect() |
| 1086 | |
| 1087 | def test_write(self): |
| 1088 | w = self.MockRawIO() |
| 1089 | pair = self.tp(self.MockRawIO(), w) |
| 1090 | |
| 1091 | pair.write(b"abc") |
| 1092 | pair.flush() |
| 1093 | buffer = bytearray(b"def") |
| 1094 | pair.write(buffer) |
| 1095 | buffer[:] = b"***" # Overwrite our copy of the data |
| 1096 | pair.flush() |
| 1097 | self.assertEqual(w._write_stack, [b"abc", b"def"]) |
| 1098 | |
| 1099 | def test_peek(self): |
| 1100 | pair = self.tp(self.BytesIO(b"abcdef"), self.MockRawIO()) |
nothing calls this directly
no test coverage detected