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:3898–3907  ·  view source on GitHub ↗
(tempdir)

Source from the content-addressed store, hash-verified

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