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

Method test_writelines

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

Source from the content-addressed store, hash-verified

1252 self.assertRaises(TypeError, f.write, 789)
1253
1254 def test_writelines(self):
1255 with BytesIO(INPUT) as f:
1256 lines = f.readlines()
1257 with BytesIO() as dst:
1258 with LZMAFile(dst, "w") as f:
1259 f.writelines(lines)
1260 expected = lzma.compress(INPUT)
1261 self.assertEqual(dst.getvalue(), expected)
1262
1263 def test_seek_forward(self):
1264 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