Skip to content

Commit

Permalink
test arrow generator works with caching
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Berenbaum committed Sep 13, 2024
1 parent 1f82d38 commit 916e86a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/unit/lib/test_arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
from datachain.lib.file import File, IndexedFile


def test_arrow_generator(tmp_path, catalog):
@pytest.mark.parametrize("cache", [True, False])
def test_arrow_generator(tmp_path, catalog, cache):
ids = [12345, 67890, 34, 0xF0123]
texts = ["28", "22", "we", "hello world"]
df = pd.DataFrame({"id": ids, "text": texts})
Expand All @@ -24,7 +25,7 @@ def test_arrow_generator(tmp_path, catalog):
pq_path = tmp_path / name
df.to_parquet(pq_path)
stream = File(path=pq_path.as_posix(), source="file:///")
stream._set_stream(catalog, caching_enabled=False)
stream._set_stream(catalog, caching_enabled=cache)

func = ArrowGenerator()
objs = list(func.process(stream))
Expand Down

0 comments on commit 916e86a

Please sign in to comment.