Skip to content

Testing and Reproducibility

ravikiranpagidi edited this page Jun 17, 2026 · 1 revision

Testing and Reproducibility

Run tests

pytest

Run quality checks

ruff check .
black --check .
python -m build
python -m twine check dist/*

Seed-based generation

A seed makes output deterministic:

data1 = generate_domain("banking", seed=42, realism="realistic")
data2 = generate_domain("banking", seed=42, realism="realistic")

assert data1["customers"].equals(data2["customers"])

Relationship integrity tests

Tests should confirm child keys exist in parent tables:

assert data["orders"]["customer_id"].isin(data["customers"]["customer_id"]).all()

Realistic value quality tests

Tests should confirm realistic mode does not only return placeholder values:

assert data["customers"]["customer_name"].str.contains(" ").any()
assert data["customers"]["email"].str.contains("@").all()

Export tests

Export tests should verify that expected folders/files are written for CSV, JSON, Parquet, and Delta when dependencies are available.

Clone this wiki locally