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

Method testWrite

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

Source from the content-addressed store, hash-verified

255 self.assertRaises(ValueError, bz2f.readlines)
256
257 def testWrite(self):
258 with BZ2File(self.filename, "w") as bz2f:
259 self.assertRaises(TypeError, bz2f.write)
260 bz2f.write(self.TEXT)
261 with open(self.filename, 'rb') as f:
262 self.assertEqual(ext_decompress(f.read()), self.TEXT)
263
264 def testWriteChunks10(self):
265 with BZ2File(self.filename, "w") as bz2f:

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