(self)
| 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: |
| 238 | testfile.write(b'ababagalamaga') |
| 239 | f = self.create_file(testfile) |
| 240 | f.setnframes(self.nframes - 1) |
| 241 | try: |
| 242 | f.writeframes(self.frames) |
| 243 | except OSError: |
| 244 | pass |
| 245 | try: |
| 246 | f.close() |
| 247 | except OSError: |
| 248 | pass |
| 249 | |
| 250 | with open(TESTFN, 'rb') as testfile: |
| 251 | self.assertEqual(testfile.read(13), b'ababagalamaga') |
| 252 | framesize = self.nchannels * self.sampwidth |
| 253 | self.check_file(testfile, self.nframes - 1, self.frames[:-framesize]) |
| 254 | |
| 255 | |
| 256 | class AudioTestsWithSourceFile(AudioTests): |
nothing calls this directly
no test coverage detected