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

Method test_append

Lib/test/test_gzip.py:214–222  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

212 f.flush()
213
214 def test_append(self):
215 self.test_write()
216 # Append to the previous file
217 with gzip.GzipFile(self.filename, 'ab') as f:
218 f.write(data2 * 15)
219
220 with gzip.GzipFile(self.filename, 'rb') as f:
221 d = f.read()
222 self.assertEqual(d, (data1*50) + (data2*15))
223
224 def test_many_append(self):
225 # Bug #1074261 was triggered when reading a file that contained

Callers

nothing calls this directly

Calls 4

test_writeMethod · 0.95
writeMethod · 0.45
readMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected