固化 Match-3 生产者、视觉、音频与双 Judge 证据闭包。 将《山海行纪》r1.1 绑定新的不可变 release,并以生产预检现场核验 bundle、Registry/2 和 25 项 Writer 快照。 同步地图1平衡锁值、跨游戏回归修复、验收契约与 SoT 证据。
28 lines
923 B
Python
28 lines
923 B
Python
"""validate.py 套件编排的基础设施失败回归测试。"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import importlib.util
|
|
import json
|
|
from pathlib import Path
|
|
|
|
|
|
HERE = Path(__file__).resolve().parent
|
|
SPEC = importlib.util.spec_from_file_location("_playloop_validate_suite", HERE / "validate.py")
|
|
assert SPEC and SPEC.loader
|
|
V = importlib.util.module_from_spec(SPEC)
|
|
SPEC.loader.exec_module(V)
|
|
|
|
|
|
def test_missing_declared_base_is_not_counted_as_expected_rejection(tmp_path, capsys):
|
|
"""负样本缺基底属于套件损坏,不能冒充命中业务拒绝规则。"""
|
|
invalid_dir = tmp_path / "visual-target-set" / "invalid"
|
|
invalid_dir.mkdir(parents=True)
|
|
(invalid_dir / "01-missing-base.json").write_text(
|
|
json.dumps({"_base": "../fixtures/missing.json"}),
|
|
encoding="utf-8",
|
|
)
|
|
|
|
assert V._run_suite(tmp_path) == 1
|
|
assert "测试基础设施失败" in capsys.readouterr().out
|