(self)
| 174 | self.check_file(testfile, self.nframes, self.frames) |
| 175 | |
| 176 | def test_multiple_writes(self): |
| 177 | with open(TESTFN, 'wb') as testfile: |
| 178 | testfile.write(b'ababagalamaga') |
| 179 | f = self.create_file(testfile) |
| 180 | f.setnframes(self.nframes) |
| 181 | framesize = self.nchannels * self.sampwidth |
| 182 | f.writeframes(self.frames[:-framesize]) |
| 183 | f.writeframes(self.frames[-framesize:]) |
| 184 | f.close() |
| 185 | |
| 186 | with open(TESTFN, 'rb') as testfile: |
| 187 | self.assertEqual(testfile.read(13), b'ababagalamaga') |
| 188 | self.check_file(testfile, self.nframes, self.frames) |
| 189 | |
| 190 | def test_overflowed_write(self): |
| 191 | with open(TESTFN, 'wb') as testfile: |
nothing calls this directly
no test coverage detected