Skip to content

Commit 66b1691

Browse files
committed
Debug: show per-key manifest diffs in test_manifest_is_current
1 parent 1041f8b commit 66b1691

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

spacy/tests/test_cli_launcher.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ def test_manifest_is_current():
5656
"from spacy_cli.build_manifest import build_manifest; "
5757
"from spacy_cli.static import load_manifest; "
5858
"b, l = build_manifest(), load_manifest(); "
59-
"diffs = {k: (str(b[k])[:80], str(l[k])[:80]) for k in b if b[k] != l[k]}; "
59+
"diffs = {}; "
60+
"[diffs.update({f'{k}.{sk}': (repr(b[k][sk])[:120], repr(l[k][sk])[:120])}) "
61+
"for k in b if isinstance(b[k], dict) and b[k] != l[k] "
62+
"for sk in b[k] if b[k].get(sk) != l[k].get(sk)]; "
63+
"[diffs.update({k: (repr(b[k])[:120], repr(l[k])[:120])}) "
64+
"for k in b if not isinstance(b[k], dict) and b[k] != l[k]]; "
6065
"assert b == l, json.dumps(diffs, indent=2)",
6166
],
6267
capture_output=True,

0 commit comments

Comments
 (0)