diff --git a/tests/test_cli.py b/tests/test_cli.py index e8d5bbeb..1349396a 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -203,13 +203,6 @@ def marker(head: str, kind: str, source: str = "model") -> str: return cli.review_marker(head, kind, source) -def test_review_marker_parser_accepts_old_and_v1_forms() -> None: - old = f"" - new = cli.review_marker("b" * 40, "delta") - assert cli.REVIEW_MARKER_RE.search(old).groups() == ("a" * 40, "primary") - assert cli.REVIEW_MARKER_RE.search(new).groups() == ("b" * 40, "delta") - - @pytest.mark.parametrize("source", ["model", "pair"]) def test_review_marker_quoted_in_prose_neither_voids_nor_hides_a_review(gh: FakeGh, source: str) -> None: head = "a" * 40 @@ -1148,17 +1141,6 @@ def test_progress_output_precedes_the_stderr_verdict_in_one_file(tmp_path: Path) assert (tmp_path / "log").read_text().splitlines() == ["waiting", "loopzero merge: dequeued"] -def test_pr_migrates_old_checks_heading_to_validation(wt: Path) -> None: - task = wt / ".loopzero" / "task.md" - task.write_text(task.read_text().replace("## Validation", "## Checks")) - - body = cli._pr_body(wt, head_of(wt), cli.config_mod.load(wt / "workflow.toml")) - - assert "## Checks" not in body - assert body.count("## Validation") == 1 - assert "(no `loopzero check` run recorded)" in body - - @pytest.mark.parametrize("corrupt_report", [False, True], ids=["no-report", "corrupt-report"]) def test_pr_updates_existing_open_pr(wt, gh, capsys, corrupt_report): if corrupt_report: @@ -3803,14 +3785,6 @@ def test_gh_errors_are_one_line_on_stderr(wt: Path, gh: FakeGh, capsys) -> None: assert err.startswith("loopzero status: gh api") and "gh auth login" in err -def test_help_lists_all_commands(capsys) -> None: - with pytest.raises(SystemExit) as info: - cli.main(["--help"]) - assert info.value.code == 0 - out = capsys.readouterr().out - assert all(word in out for word in ("start", "check", "pr", "review", "ready", "merge", "status")) - - @pytest.mark.parametrize("command", ["ready", "merge"]) @pytest.mark.parametrize("budget,conclusion", [ ("-1", "success"), ("NaN", "pending"), ("inf", "success"), ("-inf", "success"), diff --git a/tests/test_runners.py b/tests/test_runners.py index 6eedfc60..e14ccdba 100644 --- a/tests/test_runners.py +++ b/tests/test_runners.py @@ -26,7 +26,6 @@ RunnerPromptTooLong, RunnerUsageLimit, author_families, - build_prompt, codex_evidence, merge_reviews, render_patch, @@ -267,15 +266,6 @@ def repo(tmp_path): # ----------------------------------------------------------------- prompt -def test_prompt_frames_exact_task_and_raw_diff() -> None: - prompt = build_prompt(kind="delta", head="deadbeef", task_text=" Objective ", diff="+line\n") - header, diff = prompt.split("\n", 1) - assert json.loads(header) == { - "head": "deadbeef", "kind": "delta", "task_text": " Objective ", "diff_utf8_bytes": 6, - } - assert diff == "+line\n" - - @pytest.mark.parametrize("family", ["claude", "codex"]) @pytest.mark.parametrize("kind", ["primary", "delta"]) @pytest.mark.parametrize("chunk", [None, (2, 3)]) diff --git a/tests/test_worktree.py b/tests/test_worktree.py index 8315f15e..b1323269 100644 --- a/tests/test_worktree.py +++ b/tests/test_worktree.py @@ -88,12 +88,8 @@ def interleave(path, *args, **kwargs): headings = [ln for ln in text.splitlines() if ln.startswith("## ")] assert headings == ["## Context and goal", "## Acceptance", "## Notes", "## Base", "## Validation", "## Review"], "matches core/HANDOFF.md" - assert "- **Context:** " in text - assert "- **Problem:** " in text - assert "- **Goal:** " in text prompts = [ln.split(":**", 1)[0] for ln in text.splitlines() if ln.startswith("- **")] assert prompts == ["- **Goal", "- **Problem", "- **Context"], "owner-facing goal leads" - assert "Refs #" in text base_section = text.split("## Base\n", 1)[1].split("\n## ", 1)[0] assert base_section.strip().splitlines() == [f"main @ {upstream}", f"Base: {upstream}"] assert "lz/my-task" in git(repo, "branch", "--list", "lz/my-task") @@ -184,15 +180,6 @@ def test_start_rejects_bad_slug(repo: Path, slug: str) -> None: assert not (repo / ".worktrees").exists(), "rejected before fetch or worktree add" -@pytest.mark.parametrize("slug,title", [ - ("add-workflow-config-note", "Add workflow config note"), - ("fix_bug--123", "Fix bug 123"), - ("x", "X"), -]) -def test_title_from_slug(slug: str, title: str) -> None: - assert worktree.title_from_slug(slug) == title - - def test_branch_name_uses_git_check_ref_format(repo: Path) -> None: assert worktree.branch_name(repo, "ok-1.2_x") == "lz/ok-1.2_x" with pytest.raises(worktree.WorktreeError):