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

Function _check_dataset_from_path

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

Source from the content-addressed store, hash-verified

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

Calls 2

change_cwdFunction · 0.90
_check_datasetFunction · 0.85

Tested by

no test coverage detected