MCPcopy Create free account
hub / github.com/apache/arrow / test_list_format

Function test_list_format

python/pyarrow/tests/test_array.py:78–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

76
77
78def test_list_format():
79 arr = pa.array([["foo"], None, ["bar", "a longer string", None]])
80 result = arr.to_string()
81 expected = """\
82[
83 [
84 "foo"
85 ],
86 null,
87 [
88 "bar",
89 "a longer string",
90 null
91 ]
92]"""
93 assert result == expected
94
95 result = arr.to_string(element_size_limit=10)
96 expected = """\
97[
98 [
99 "foo"
100 ],
101 null,
102 [
103 "bar",
104 "a longer (... 7 chars omitted)",
105 null
106 ]
107]"""
108 assert result == expected
109
110
111def test_string_format():

Callers

nothing calls this directly

Calls 2

arrayMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected