Add evidence-based regression and schema compatibility checks
This commit is contained in:
@@ -589,6 +589,25 @@ def test_inspect_shows_contract_proposal_and_passing_conformance(
|
||||
assert "PASSED" in output
|
||||
|
||||
|
||||
def test_inspect_can_save_passing_baseline(tmp_path, monkeypatch, capsys):
|
||||
from cmdforge.cli import cmd_inspect
|
||||
from cmdforge.contract_testing import CONFORMANCE_FILE
|
||||
|
||||
tool = Tool(
|
||||
name="baseline", version="1.0.0", input_schema={},
|
||||
output_schema={"type": "string"}, output="stable",
|
||||
path=tmp_path / "config.yaml",
|
||||
)
|
||||
monkeypatch.setattr("cmdforge.tool.load_tool", lambda name: tool)
|
||||
|
||||
args = SimpleNamespace(
|
||||
name="baseline", registry=False, save_baseline=True
|
||||
)
|
||||
assert cmd_inspect(args) == 0
|
||||
assert (tmp_path / CONFORMANCE_FILE).exists()
|
||||
assert "Saved conformance baseline" in capsys.readouterr().out
|
||||
|
||||
|
||||
def test_switch_to_existing_tool_closes_creation_page_first():
|
||||
pytest.importorskip("PySide6")
|
||||
from cmdforge.gui.pages.tool_builder_page import _switch_to_existing_tool
|
||||
|
||||
Reference in New Issue
Block a user