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

Method testAppend

Lib/test/test_bz2.py:301–309  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

299 self.assertRaises(OSError, bz2f.writelines, [b"a"])
300
301 def testAppend(self):
302 with BZ2File(self.filename, "w") as bz2f:
303 self.assertRaises(TypeError, bz2f.write)
304 bz2f.write(self.TEXT)
305 with BZ2File(self.filename, "a") as bz2f:
306 self.assertRaises(TypeError, bz2f.write)
307 bz2f.write(self.TEXT)
308 with open(self.filename, 'rb') as f:
309 self.assertEqual(ext_decompress(f.read()), self.TEXT * 2)
310
311 def testSeekForward(self):
312 self.createTempFile()

Callers

nothing calls this directly

Calls 7

BZ2FileClass · 0.90
ext_decompressFunction · 0.85
openFunction · 0.50
assertRaisesMethod · 0.45
writeMethod · 0.45
assertEqualMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected