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

Method test_writelines

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

Source from the content-addressed store, hash-verified

3666
3667class StreamRecoderTest(unittest.TestCase):
3668 def test_writelines(self):
3669 bio = io.BytesIO()
3670 codec = codecs.lookup('ascii')
3671 sr = codecs.StreamRecoder(bio, codec.encode, codec.decode,
3672 encodings.ascii.StreamReader, encodings.ascii.StreamWriter)
3673 sr.writelines([b'a', b'b'])
3674 self.assertEqual(bio.getvalue(), b'ab')
3675
3676 def test_write(self):
3677 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