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

Method test_writelines

Lib/test/test_codecs.py:3655–3661  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3653
3654class StreamRecoderTest(unittest.TestCase):
3655 def test_writelines(self):
3656 bio = io.BytesIO()
3657 codec = codecs.lookup('ascii')
3658 sr = codecs.StreamRecoder(bio, codec.encode, codec.decode,
3659 encodings.ascii.StreamReader, encodings.ascii.StreamWriter)
3660 sr.writelines([b'a', b'b'])
3661 self.assertEqual(bio.getvalue(), b'ab')
3662
3663 def test_write(self):
3664 bio = io.BytesIO()

Callers

nothing calls this directly

Calls 4

writelinesMethod · 0.95
getvalueMethod · 0.95
lookupMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected