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

Function test_relative_paths

python/pyarrow/tests/parquet/test_basic.py:314–332  ·  view source on GitHub ↗
(tempdir, filesystem, name)

Source from the content-addressed store, hash-verified

312])
313@pytest.mark.parametrize("name", ("data.parquet", "例.parquet"))
314def test_relative_paths(tempdir, filesystem, name):
315 # reading and writing from relative paths
316 table = pa.table({"a": [1, 2, 3]})
317 path = tempdir / name
318
319 # reading
320 pq.write_table(table, str(path))
321 with util.change_cwd(tempdir):
322 result = pq.read_table(name, filesystem=filesystem)
323 assert result.equals(table)
324
325 path.unlink()
326 assert not path.exists()
327
328 # writing
329 with util.change_cwd(tempdir):
330 pq.write_table(table, name, filesystem=filesystem)
331 result = pq.read_table(path)
332 assert result.equals(table)
333
334
335def test_read_non_existing_file():

Callers

nothing calls this directly

Calls 3

equalsMethod · 0.80
write_tableMethod · 0.45
read_tableMethod · 0.45

Tested by

no test coverage detected