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

Method testWrite

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

Source from the content-addressed store, hash-verified

245 self.assertRaises(ValueError, bz2f.readlines)
246
247 def testWrite(self):
248 with BZ2File(self.filename, "w") as bz2f:
249 self.assertRaises(TypeError, bz2f.write)
250 bz2f.write(self.TEXT)
251 with open(self.filename, 'rb') as f:
252 self.assertEqual(ext_decompress(f.read()), self.TEXT)
253
254 def testWriteChunks10(self):
255 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