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

Function test_memory_map

python/pyarrow/tests/parquet/test_basic.py:122–133  ·  view source on GitHub ↗
(tempdir)

Source from the content-addressed store, hash-verified

120
121@pytest.mark.pandas
122def test_memory_map(tempdir):
123 df = alltypes_sample(size=10)
124
125 table = pa.Table.from_pandas(df)
126 _check_roundtrip(table, read_table_kwargs={'memory_map': True},
127 version='2.6')
128
129 filename = str(tempdir / 'tmp_file')
130 with open(filename, 'wb') as f:
131 _write_table(table, f, version='2.6')
132 table_read = pq.read_pandas(filename, memory_map=True)
133 assert table_read.equals(table)
134
135
136def test_parquet_read_write_table_raw_fd(tempdir):

Callers

nothing calls this directly

Calls 5

alltypes_sampleFunction · 0.90
_check_roundtripFunction · 0.90
_write_tableFunction · 0.90
equalsMethod · 0.80
read_pandasMethod · 0.45

Tested by

no test coverage detected