assert results_1, "Shard 0 is expected to have at least one row"
results_2 = [dict(row._asdict()) for row in reader_2]
assert results_2, "Shard 0 is expected to have at least one row"
After Change
Tests that the reader only returns half of the expected data consistently
with reader_factory(synthetic_dataset.url, cur_shard=0, shard_count=5) as reader:
with reader_factory(synthetic_dataset.url, cur_shard=0, shard_count=5) as reader_2:
results_1 = set(_readout_all_ids(reader))
results_2 = set(_readout_all_ids(reader_2))
assert results_1, "Non empty shard expected"