From 0bdea6503088b18c97b967ce535a8e7b9848b7e2 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sun, 8 Nov 2026 10:58:13 +0100 Subject: [PATCH] =?UTF-8?q?Answer=20stability=20round=202:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(0=20misread);=20test=20that?= =?UTF-8?q?=20a=20pushed=20cut=20tag=20and=20an=20unpushed=20tag=20elsewhe?= =?UTF-8?q?re=20survive?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/deploy_release/test_deploy_release.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bin/deploy_release/test_deploy_release.py b/bin/deploy_release/test_deploy_release.py index 3b775635..cacc2c96 100644 --- a/bin/deploy_release/test_deploy_release.py +++ b/bin/deploy_release/test_deploy_release.py @@ -416,6 +416,15 @@ class Cut(unittest.TestCase): hook.unlink() self.assert_cut(self.cut()) + def test_keeps_a_pushed_cut_tag_and_an_unpushed_tag_on_any_other_commit(self): + self.git(self.clone, "switch", "-q", "-c", "side") + self.commit({"side.md": "Side.\n"}, "Side") + self.git(self.clone, "tag", "-a", "v9.9.9", "-m", "Mine") + self.git(self.clone, "switch", "-q", "main") + self.assert_cut(self.cut()) + self.assertEqual(self.cut().returncode, 1, "0.2.0 is cut, so a second run refuses") + self.assertEqual(self.git(self.clone, "tag", "-l", "v0.2.0", "v9.9.9").split(), ["v0.2.0", "v9.9.9"]) + def test_takes_no_option_but_cut(self): ran = subprocess.run([sys.executable, str(TOOL), "--cut", "--force"], capture_output=True, cwd=self.clone, env=self.env, text=True) self.assertEqual(ran.returncode, 1)