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

Method test_readline

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

Source from the content-addressed store, hash-verified

3016 self.assertEqual(sout, b"\x80")
3017
3018 def test_readline(self):
3019 for encoding in bytes_transform_encodings:
3020 with self.subTest(encoding=encoding):
3021 sin = codecs.encode(b"\x80", encoding)
3022 reader = codecs.getreader(encoding)(io.BytesIO(sin))
3023 sout = reader.readline()
3024 self.assertEqual(sout, b"\x80")
3025
3026 def test_buffer_api_usage(self):
3027 # We check all the transform codecs accept memoryview input

Callers

nothing calls this directly

Calls 5

getreaderMethod · 0.80
subTestMethod · 0.45
encodeMethod · 0.45
readlineMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected