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

Function test_write_dataset_schema_metadata

python/pyarrow/tests/test_dataset.py:5062–5071  ·  view source on GitHub ↗
(tempdir)

Source from the content-addressed store, hash-verified

5060
5061@pytest.mark.filterwarnings("ignore:pyarrow.feather:FutureWarning")
5062def test_write_dataset_schema_metadata(tempdir):
5063 # ensure that schema metadata gets written
5064 from pyarrow import feather
5065
5066 table = pa.table({'a': [1, 2, 3]})
5067 table = table.replace_schema_metadata({b'key': b'value'})
5068 ds.write_dataset(table, tempdir, format="feather")
5069
5070 schema = feather.read_table(tempdir / "part-0.feather").schema
5071 assert schema.metadata == {b'key': b'value'}
5072
5073
5074@pytest.mark.parquet

Callers

nothing calls this directly

Calls 1

read_tableMethod · 0.45

Tested by

no test coverage detected