danish-dynaword / tests /test_load.py
KennethEnevoldsen's picture
ci: Added a simple test suite
7ed5f43 unverified
raw
history blame
328 Bytes
from datasets import load_dataset
from pathlib import Path
def test_dataset_loads():
repo = Path(__file__).parent.parent
name = str(repo.resolve()) # "danish-foundation-models/danish-gigaword-2"
ds = load_dataset(name, split="train", streaming=True)
sample = next(iter(ds))
assert isinstance(sample, dict)