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

Method test_writelines

Lib/test/test_lzma.py:1264–1271  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1262 self.assertRaises(TypeError, f.write, 789)
1263
1264 def test_writelines(self):
1265 with BytesIO(INPUT) as f:
1266 lines = f.readlines()
1267 with BytesIO() as dst:
1268 with LZMAFile(dst, "w") as f:
1269 f.writelines(lines)
1270 expected = lzma.compress(INPUT)
1271 self.assertEqual(dst.getvalue(), expected)
1272
1273 def test_seek_forward(self):
1274 with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:

Callers

nothing calls this directly

Calls 7

BytesIOClass · 0.90
LZMAFileClass · 0.90
readlinesMethod · 0.45
writelinesMethod · 0.45
compressMethod · 0.45
assertEqualMethod · 0.45
getvalueMethod · 0.45

Tested by

no test coverage detected