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

Method test_readline

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

Source from the content-addressed store, hash-verified

3027 self.assertEqual(sout, b"\x80")
3028
3029 def test_readline(self):
3030 for encoding in bytes_transform_encodings:
3031 with self.subTest(encoding=encoding):
3032 sin = codecs.encode(b"\x80", encoding)
3033 reader = codecs.getreader(encoding)(io.BytesIO(sin))
3034 sout = reader.readline()
3035 self.assertEqual(sout, b"\x80")
3036
3037 def test_buffer_api_usage(self):
3038 # We check all the transform codecs accept memoryview input

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected