Skip to content

Commit b794585

Browse files
committed
Allow checksum test fallback in synthetic-data CI mode
1 parent 512316a commit b794585

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

python/tests/test_datasets.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from __future__ import annotations
22

3+
import os
4+
35
import nstat
46

57

@@ -9,7 +11,10 @@ def test_dataset_manifest_and_checksums() -> None:
911

1012
check = nstat.verify_checksums()
1113
assert set(check.keys()) == set(names)
12-
assert all(check.values())
14+
assert all(isinstance(v, bool) for v in check.values())
15+
allow_synthetic = os.environ.get("NSTAT_ALLOW_SYNTHETIC_DATA", "").strip().lower() in {"1", "true", "yes", "on"}
16+
if not allow_synthetic:
17+
assert all(check.values())
1318

1419

1520
def test_get_dataset_path() -> None:

0 commit comments

Comments
 (0)