MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_overflowed_write

Method test_overflowed_write

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

Source from the content-addressed store, hash-verified

182 self.check_file(testfile, self.nframes, self.frames)
183
184 def test_overflowed_write(self):
185 with open(TESTFN, 'wb') as testfile:
186 testfile.write(b'ababagalamaga')
187 f = self.create_file(testfile)
188 f.setnframes(self.nframes - 1)
189 f.writeframes(self.frames)
190 f.close()
191
192 with open(TESTFN, 'rb') as testfile:
193 self.assertEqual(testfile.read(13), b'ababagalamaga')
194 self.check_file(testfile, self.nframes, self.frames)
195
196 def test_unseekable_read(self):
197 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