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

Function test_parquet_dataset_factory_invalid

python/pyarrow/tests/test_dataset.py:3896–3905  ·  view source on GitHub ↗
(tempdir)

Source from the content-addressed store, hash-verified

3894@pytest.mark.parquet
3895@pytest.mark.pandas
3896def test_parquet_dataset_factory_invalid(tempdir):
3897 root_path = tempdir / "test_parquet_dataset_invalid"
3898 metadata_path, table = _create_parquet_dataset_simple(root_path)
3899 # remove one of the files
3900 list(root_path.glob("*.parquet"))[0].unlink()
3901 dataset = ds.parquet_dataset(metadata_path)
3902 assert dataset.schema.equals(table.schema)
3903 assert len(dataset.files) == 4
3904 with pytest.raises(FileNotFoundError):
3905 dataset.to_table()
3906
3907
3908def _create_metadata_file(root_path):

Callers

nothing calls this directly

Calls 5

listFunction · 0.85
lenFunction · 0.85
equalsMethod · 0.80
to_tableMethod · 0.45

Tested by

no test coverage detected