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

Function test_03

extra_tests/snippets/stdlib_io_stringio.py:29–40  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

27
28
29def test_03():
30 """
31 Tests that the read method (integer arg)
32 returns the expected value
33 """
34 string = "Test String 3"
35 f = StringIO(string)
36
37 assert f.read(1) == "T"
38 assert f.read(1) == "e"
39 assert f.read(1) == "s"
40 assert f.read(1) == "t"
41
42
43def test_04():

Callers 1

Calls 2

StringIOClass · 0.90
readMethod · 0.45

Tested by

no test coverage detected