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

Method test_incompleted_write

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

Source from the content-addressed store, hash-verified

162 self.check_file(TESTFN, self.nframes, self.frames)
163
164 def test_incompleted_write(self):
165 with open(TESTFN, 'wb') as testfile:
166 testfile.write(b'ababagalamaga')
167 f = self.create_file(testfile)
168 f.setnframes(self.nframes + 1)
169 f.writeframes(self.frames)
170 f.close()
171
172 with open(TESTFN, 'rb') as testfile:
173 self.assertEqual(testfile.read(13), b'ababagalamaga')
174 self.check_file(testfile, self.nframes, self.frames)
175
176 def test_multiple_writes(self):
177 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