MCPcopy Index your code
hub / github.com/python/cpython / test_read_not_from_start

Method test_read_not_from_start

Lib/test/audiotests.py:325–338  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

323 fout.readframes(fout.getnframes()))
324
325 def test_read_not_from_start(self):
326 with open(TESTFN, 'wb') as testfile:
327 testfile.write(b'ababagalamaga')
328 with open(self.sndfilepath, 'rb') as f:
329 testfile.write(f.read())
330
331 with open(TESTFN, 'rb') as testfile:
332 self.assertEqual(testfile.read(13), b'ababagalamaga')
333 with self.module.open(testfile, 'rb') as f:
334 self.assertEqual(f.getnchannels(), self.nchannels)
335 self.assertEqual(f.getsampwidth(), self.sampwidth)
336 self.assertEqual(f.getframerate(), self.framerate)
337 self.assertEqual(f.getnframes(), self.sndfilenframes)
338 self.assertEqual(f.readframes(self.nframes), self.frames)

Callers

nothing calls this directly

Calls 10

readframesMethod · 0.80
openFunction · 0.50
writeMethod · 0.45
readMethod · 0.45
assertEqualMethod · 0.45
openMethod · 0.45
getnchannelsMethod · 0.45
getsampwidthMethod · 0.45
getframerateMethod · 0.45
getnframesMethod · 0.45

Tested by

no test coverage detected