def test_simple_read_from_parquet_file(synthetic_dataset, reader_factory):
    """See if we can read data when a single parquet file is specified instead of a parquet directory"""
    assert synthetic_dataset.url.startswith('file://')
    path = synthetic_dataset.url[len('file://'):]
    one_parquet_file = glob.glob(f'{path}/**/*.parquet')[0]
    with reader_factory(f"file://{one_parquet_file}") as reader:
        all_data_from_file = list(reader)
    assert len(all_data_from_file) > 0

    with reader_factory([f"file://{one_parquet_file}", f"file://{one_parquet_file}"]) as reader:
        all_data_from_file_twice = list(reader)
    assert len(all_data_from_file) < len(all_data_from_file_twice)
See if we can read data when a single parquet file is specified instead of a parquet directory
petastorm/tests/test_end_to_end.py