danish-dynaword / src /tests /test_unique_ids.py
KennethEnevoldsen's picture
moved tests to allow for imports
936cd0c unverified
raw
history blame contribute delete
333 Bytes
from pathlib import Path
from typing import cast
from datasets import Dataset, load_dataset
def test_ensure_ids_are_unique(repo_path: Path):
# repo = Path(__file__).parent.parent
name = str(repo_path.resolve())
ds = load_dataset(name, split="train")
ds = cast(Dataset, ds)
assert len(set(ds["id"])) == len(ds)