// Read a bunch of entries from the dataset and compare the data to reference
for row in reader:
actual = dict(row._asdict())
expected = next(d for d in synthetic_dataset.data if d["id"] == actual["id"])
np.testing.assert_equal(expected["id"], actual["id"])
@pytest.mark.parametrize("reader_factory", MINIMAL_READER_FLAVOR_FACTORIES)
After Change
Test quering a single column with a predicate on the same column
with reader_factory(synthetic_dataset.url, schema_fields=[TestSchema.id], predicate=EqualPredicate({"id": 1})) \
as reader:
all_rows = list(reader)
assert 1 == len(all_rows)
assert 1 == all_rows[0].id