diff --git a/server/python/tests/codegen/test_cli_config_verify.py b/server/python/tests/codegen/test_cli_config_verify.py index a49ff6512..511b06500 100644 --- a/server/python/tests/codegen/test_cli_config_verify.py +++ b/server/python/tests/codegen/test_cli_config_verify.py @@ -2,19 +2,15 @@ from __future__ import annotations import json +import shutil from pathlib import Path from metaobjects.cli import main from tests.codegen.gen_suite import GEN_SUITE from tests.codegen.config_helpers import as_config -FITNESS = ( - Path(__file__).parents[4] - / "fixtures" - / "persistence-conformance" - / "canonical" - / "meta.fitness.json" -) +CANONICAL = Path(__file__).parents[4] / "fixtures" / "persistence-conformance" / "canonical" +FITNESS = CANONICAL / "meta.fitness.json" TWO_TARGETS = """ targets: @@ -59,6 +55,9 @@ def test_verify_codegen_no_args_in_sync(tmp_path: Path) -> None: def test_verify_codegen_bare_defaults_to_codegen(tmp_path: Path, monkeypatch) -> None: _project(tmp_path) + # Bare verify also runs the template gate against `prompts/` (the default root), and the + # fitness model's `template.prompt` refs resolve there. + shutil.copytree(CANONICAL / "prompts", tmp_path / "prompts") monkeypatch.chdir(tmp_path) assert main(["gen"]) == 0 assert main(["verify"]) == 0 # bare verify → --codegen (config-driven), plus --templates diff --git a/server/python/tests/codegen/test_cli_verify_requirements.py b/server/python/tests/codegen/test_cli_verify_requirements.py index 544ef81b6..c8f3dec2a 100644 --- a/server/python/tests/codegen/test_cli_verify_requirements.py +++ b/server/python/tests/codegen/test_cli_verify_requirements.py @@ -434,9 +434,12 @@ def test_a_model_with_no_requirement_and_no_generators_selected_still_exits_0_an assert _verify_with_nothing_selected(tmp_path, meta_dir) == 0 captured = capsys.readouterr() assert captured.out == _NOTHING_TO_CHECK_OUT - # stderr holds the one line a bare `verify` has always printed, and nothing else. - (note,) = captured.err.splitlines() - assert note.startswith("metaobjects verify — running --codegen (default).") + # stderr holds the two lines a bare `verify` over a named prints (the default + # gate-set note, then the template gate's skip note, since no --prompts root is named), and + # nothing else. + note, skipped = captured.err.splitlines() + assert note.startswith("metaobjects verify — running --codegen --templates (default).") + assert skipped.startswith("metaobjects verify — template gate skipped:") # ---------------------------------------------------------------------------