(self)
| 216 | self.check_file(TESTFN, self.nframes, self.frames) |
| 217 | |
| 218 | def test_unseekable_incompleted_write(self): |
| 219 | with UnseekableIO(TESTFN, 'wb') as testfile: |
| 220 | testfile.write(b'ababagalamaga') |
| 221 | f = self.create_file(testfile) |
| 222 | f.setnframes(self.nframes + 1) |
| 223 | try: |
| 224 | f.writeframes(self.frames) |
| 225 | except OSError: |
| 226 | pass |
| 227 | try: |
| 228 | f.close() |
| 229 | except OSError: |
| 230 | pass |
| 231 | |
| 232 | with open(TESTFN, 'rb') as testfile: |
| 233 | self.assertEqual(testfile.read(13), b'ababagalamaga') |
| 234 | self.check_file(testfile, self.nframes + 1, self.frames) |
| 235 | |
| 236 | def test_unseekable_overflowed_write(self): |
| 237 | with UnseekableIO(TESTFN, 'wb') as testfile: |
nothing calls this directly
no test coverage detected