Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tests/test_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,17 @@ def test_concurrent_download_and_prepare(self):
)
)

def test_as_iterable_dataset_from_cache():
builder = load_dataset_builder("c4", "en")
builder.download_and_prepare()
iterable_ds = builder.as_iterable_dataset(split="train[:100]")
count = 0
for example in iterable_ds:
assert "text" in example
count += 1
if count > 10:
break # Don't iterate full 100 in test

def test_download_and_prepare_with_base_path(self):
with tempfile.TemporaryDirectory() as tmp_dir:
rel_path = "dummy1.data"
Expand Down