Fix failing integration test after adding test HTML presets
comparison.json was stale (built from 2 test presets only) while modlist_html/ now has 4 files. Regenerated comparison.json from all presets to restore consistency. Also added _SkipTest exception to the test harness so the consistency check skips gracefully on a fresh clone (comparison.json is gitignored) instead of raising AssertionError. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -33,12 +33,19 @@ def group(name: str) -> None:
|
||||
print(f"{'-'*60}")
|
||||
|
||||
|
||||
class _SkipTest(Exception):
|
||||
pass
|
||||
|
||||
|
||||
def test(name: str, fn) -> None:
|
||||
global _passed, _failed
|
||||
global _passed, _failed, _skipped
|
||||
try:
|
||||
fn()
|
||||
print(f" [PASS] {name}")
|
||||
_passed += 1
|
||||
except _SkipTest as exc:
|
||||
print(f" [SKIP] {name} ({exc})")
|
||||
_skipped += 1
|
||||
except Exception as exc:
|
||||
print(f" [FAIL] {name}")
|
||||
for line in traceback.format_exc().splitlines():
|
||||
@@ -1323,7 +1330,7 @@ def _test_comparison_json_consistent_with_html():
|
||||
html_dir = Path(__file__).parent / "modlist_html"
|
||||
json_file = Path(__file__).parent / "modlist_json" / "comparison.json"
|
||||
if not json_file.exists():
|
||||
raise AssertionError(f"comparison.json not found: {json_file}")
|
||||
raise _SkipTest("comparison.json not found (run pipeline first)")
|
||||
|
||||
presets = parse_modlist_dir(html_dir)
|
||||
fresh = compare_presets(*presets)
|
||||
|
||||
Reference in New Issue
Block a user