(self)
| 298 | f.setpos(f.getnframes() + 1) |
| 299 | |
| 300 | def test_copy(self): |
| 301 | f = self.f = self.module.open(self.sndfilepath) |
| 302 | fout = self.fout = self.module.open(TESTFN, 'wb') |
| 303 | fout.setparams(f.getparams()) |
| 304 | i = 0 |
| 305 | n = f.getnframes() |
| 306 | while n > 0: |
| 307 | i += 1 |
| 308 | fout.writeframes(f.readframes(i)) |
| 309 | n -= i |
| 310 | fout.close() |
| 311 | fout = self.fout = self.module.open(TESTFN, 'rb') |
| 312 | f.rewind() |
| 313 | self.assertEqual(f.getparams(), fout.getparams()) |
| 314 | self.assertEqual(f.readframes(f.getnframes()), |
| 315 | fout.readframes(fout.getnframes())) |
| 316 | |
| 317 | def test_read_not_from_start(self): |
| 318 | with open(TESTFN, 'wb') as testfile: |
nothing calls this directly
no test coverage detected