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

Function test_03

extra_tests/snippets/stdlib_io_bytesio.py:22–33  ·  view source on GitHub ↗

Tests that the read method (integer arg) returns the expected value

()

Source from the content-addressed store, hash-verified

20
21
22def test_03():
23 """
24 Tests that the read method (integer arg)
25 returns the expected value
26 """
27 string = b"Test String 3"
28 f = BytesIO(string)
29
30 assert f.read(1) == b"T"
31 assert f.read(1) == b"e"
32 assert f.read(1) == b"s"
33 assert f.read(1) == b"t"
34
35
36def test_04():

Callers 1

Calls 2

readMethod · 0.95
BytesIOClass · 0.90

Tested by

no test coverage detected