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

Function test_05

extra_tests/snippets/stdlib_io_bytesio.py:51–60  ·  view source on GitHub ↗

Tests that the write method accepts bytearray

()

Source from the content-addressed store, hash-verified

49
50
51def test_05():
52 """
53 Tests that the write method accepts bytearray
54 """
55 bytes_string = b"Test String 5"
56
57 f = BytesIO()
58 f.write(bytearray(bytes_string))
59
60 assert f.getvalue() == bytes_string
61
62
63def test_06():

Callers 1

Calls 3

writeMethod · 0.95
getvalueMethod · 0.95
BytesIOClass · 0.90

Tested by

no test coverage detected