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

Function _check_dataset_from_path

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

Source from the content-addressed store, hash-verified

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

Calls 2

change_cwdFunction · 0.90
_check_datasetFunction · 0.85

Tested by

no test coverage detected