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

Function test_table_function_unicode_schema

python/pyarrow/tests/test_table.py:2828–2839  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2826
2827
2828def test_table_function_unicode_schema():
2829 col_a = "äääh"
2830 col_b = "öööf"
2831
2832 # Put in wrong order to make sure that lines up with schema
2833 d = OrderedDict([(col_b, ['a', 'b', 'c']), (col_a, [1, 2, 3])])
2834
2835 schema = pa.schema([(col_a, pa.int32()), (col_b, pa.string())])
2836
2837 result = pa.table(d, schema=schema)
2838 assert result[0].chunk(0).equals(pa.array([1, 2, 3], type='int32'))
2839 assert result[1].chunk(0).equals(pa.array(['a', 'b', 'c'], type='string'))
2840
2841
2842def test_table_take_vanilla_functionality():

Callers

nothing calls this directly

Calls 4

equalsMethod · 0.80
schemaMethod · 0.45
stringMethod · 0.45
arrayMethod · 0.45

Tested by

no test coverage detected