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

Function test_read_table

python/pyarrow/tests/test_feather.py:187–207  ·  view source on GitHub ↗
(version)

Source from the content-addressed store, hash-verified

185
186@pytest.mark.pandas
187def test_read_table(version):
188 num_values = (100, 100)
189 path = random_path()
190
191 TEST_FILES.append(path)
192
193 values = np.random.randint(0, 100, size=num_values)
194 columns = ['col_' + str(i) for i in range(100)]
195 table = pa.Table.from_arrays(values, columns)
196
197 write_feather(table, path, version=version)
198
199 result = read_table(path)
200 assert result.equals(table)
201
202 # Test without memory mapping
203 result = read_table(path, memory_map=False)
204 assert result.equals(table)
205
206 result = read_feather(path, memory_map=False)
207 assert_frame_equal(table.to_pandas(), result)
208
209
210@pytest.mark.pandas

Callers

nothing calls this directly

Calls 6

write_featherFunction · 0.90
read_tableFunction · 0.90
read_featherFunction · 0.90
random_pathFunction · 0.85
equalsMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected