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

Function _check_dataset_from_path

python/pyarrow/tests/test_dataset.py:2419–2433  ·  view source on GitHub ↗
(path, table, dataset_reader, pickler, **kwargs)

Source from the content-addressed store, hash-verified

2417
2418
2419def _check_dataset_from_path(path, table, dataset_reader, pickler, **kwargs):
2420 # pathlib object
2421 assert isinstance(path, pathlib.Path)
2422
2423 # accept Path, str, List[Path], List[str]
2424 for p in [path, str(path), [path], [str(path)]]:
2425 dataset = ds.dataset(path, **kwargs)
2426 assert isinstance(dataset, ds.FileSystemDataset)
2427 _check_dataset(dataset, table, dataset_reader, pickler)
2428
2429 # relative string path
2430 with change_cwd(path.parent):
2431 dataset = ds.dataset(path.name, **kwargs)
2432 assert isinstance(dataset, ds.FileSystemDataset)
2433 _check_dataset(dataset, table, dataset_reader, pickler)
2434
2435
2436@pytest.mark.parquet

Calls 2

change_cwdFunction · 0.90
_check_datasetFunction · 0.85

Tested by

no test coverage detected