[lang-ref] ( string_byte_size ) ( python )
@pytest.mark.parametrize(
's, expected',
[
('', 0),
('abc', 3),
('あいう', 9),
],
)
def test_string_byte_size(s, expected):
size = len(s.encode('UTF-8'))
assert size == expected