(self)
| 86 | |
| 87 | # verify readinto |
| 88 | def testReadintoByteArray(self): |
| 89 | self.f.write(bytes([1, 2, 0, 255])) |
| 90 | self.f.close() |
| 91 | |
| 92 | ba = bytearray(b'abcdefgh') |
| 93 | with self.FileIO(TESTFN, 'r') as f: |
| 94 | n = f.readinto(ba) |
| 95 | self.assertEqual(ba, b'\x01\x02\x00\xffefgh') |
| 96 | self.assertEqual(n, 4) |
| 97 | |
| 98 | def _testReadintoMemoryview(self): |
| 99 | self.f.write(bytes([1, 2, 0, 255])) |
nothing calls this directly
no test coverage detected