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

Function test_06

extra_tests/snippets/stdlib_io_bytesio.py:63–74  ·  view source on GitHub ↗

Tests readline

()

Source from the content-addressed store, hash-verified

61
62
63def test_06():
64 """
65 Tests readline
66 """
67 bytes_string = b"Test String 6\nnew line is here\nfinished"
68
69 f = BytesIO(bytes_string)
70
71 assert f.readline() == b"Test String 6\n"
72 assert f.readline() == b"new line is here\n"
73 assert f.readline() == b"finished"
74 assert f.readline() == b""
75
76
77def test_07():

Callers 1

Calls 2

BytesIOClass · 0.90
readlineMethod · 0.45

Tested by

no test coverage detected