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

Method test_overflowed_write

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

Source from the content-addressed store, hash-verified

188 self.check_file(testfile, self.nframes, self.frames)
189
190 def test_overflowed_write(self):
191 with open(TESTFN, 'wb') as testfile:
192 testfile.write(b'ababagalamaga')
193 f = self.create_file(testfile)
194 f.setnframes(self.nframes - 1)
195 f.writeframes(self.frames)
196 f.close()
197
198 with open(TESTFN, 'rb') as testfile:
199 self.assertEqual(testfile.read(13), b'ababagalamaga')
200 self.check_file(testfile, self.nframes, self.frames)
201
202 def test_unseekable_read(self):
203 with self.create_file(TESTFN) as f:

Callers

nothing calls this directly

Calls 9

create_fileMethod · 0.95
check_fileMethod · 0.95
setnframesMethod · 0.80
writeframesMethod · 0.80
openFunction · 0.50
writeMethod · 0.45
closeMethod · 0.45
assertEqualMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected