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

Method test_incompleted_write

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

Source from the content-addressed store, hash-verified

156 self.check_file(TESTFN, self.nframes, self.frames)
157
158 def test_incompleted_write(self):
159 with open(TESTFN, 'wb') as testfile:
160 testfile.write(b'ababagalamaga')
161 f = self.create_file(testfile)
162 f.setnframes(self.nframes + 1)
163 f.writeframes(self.frames)
164 f.close()
165
166 with open(TESTFN, 'rb') as testfile:
167 self.assertEqual(testfile.read(13), b'ababagalamaga')
168 self.check_file(testfile, self.nframes, self.frames)
169
170 def test_multiple_writes(self):
171 with open(TESTFN, 'wb') as testfile:

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