Kill the mutants that survived on the release's changed lines, and say 1 minute, not 1 minutes
CI / tests (pull_request) Successful in 4m10s

This commit is contained in:
2026-11-27 13:08:58 +01:00
parent 3b4ff44e7a
commit 72c5903cb0
4 changed files with 149 additions and 3 deletions
+25
View File
@@ -356,6 +356,31 @@ class ChunkItem(unittest.TestCase):
self.assertEqual(held.cut, release_standing.LastCut("v0.1.0", "# Changelog\n\n## 0.2.0 - 2026-10-03\n", 1, [HEADER + ROW.format(id=1, release="0.2.0")], frozenset()))
self.assertEqual(release_standing.chunk_item(plan_under((0, 2, 0)), held.cut), release_standing.Next((0, 2, 0), one((0, 2, 0))))
def test_reads_the_plan_as_the_last_tag_holds_it_and_as_each_later_commit_left_it(self):
repo = tempfile.mkdtemp()
self.addCleanup(subprocess.run, ["rm", "-rf", repo])
run = lambda *args: subprocess.run(["git", "-c", "user.name=t", "-c", "user.email=t@t", *args], capture_output=True, check=True, cwd=repo, env=isolated_env(), text=True)
run("init", "-q", "-b", "main")
before, tagged, after = (HEADER + ROW.format(id=1, release=release) for release in ("0.1.0", "0.2.0", "0.3.0"))
for text, title in ((before, "Plan 0.1.0"), (tagged, "Plan 0.2.0")):
pathlib.Path(repo, "todo.md").write_text(text)
run("add", "todo.md")
run("commit", "-q", "-m", title)
run("tag", "v0.1.0")
pathlib.Path(repo, "todo.md").write_text(after)
run("commit", "-q", "-am", "Plan 0.3.0")
self.assertEqual(release_standing.default_plan(repo, "main", plan_in(repo), changelog_of(repo), BARE).cut.todos_since, [tagged, after])
def test_gives_gits_own_failure_as_the_reviews_where_the_tags_cannot_be_read(self):
repo = tempfile.mkdtemp()
self.addCleanup(subprocess.run, ["rm", "-rf", repo])
run = lambda *args: subprocess.run(["git", "-c", "user.name=t", "-c", "user.email=t@t", *args], capture_output=True, check=True, cwd=repo, env=isolated_env(), text=True)
run("init", "-q", "-b", "main")
run("commit", "-q", "--allow-empty", "-m", "Release review of 0.2.0")
no_tags = lambda *args, cwd: Failure("git tag failed: no tags") if "tag" in args else release_standing.git(*args, cwd=cwd)
cut = release_standing.default_plan(repo, "main", plan_in(repo), changelog_of(repo), BARE, no_tags).cut
self.assertEqual((cut.tag, cut.reviews), (Failure("git tag failed: no tags"), Failure("git tag failed: no tags")))
def test_reads_a_plan_and_a_changelog_outside_the_checkout_as_they_stand(self):
repo, folder = tempfile.mkdtemp(), pathlib.Path(tempfile.mkdtemp())
self.addCleanup(subprocess.run, ["rm", "-rf", repo, str(folder)])