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)