chore(release): harden nick contract for v0.1.2

This commit is contained in:
2026-08-15 23:46:57 +09:00
parent e6a90800ec
commit c292df0a4b
8 changed files with 97 additions and 22 deletions
+4 -4
View File
@@ -65,11 +65,11 @@ def test_checkout_identity_is_exact():
def test_project_version_must_match_release_tag(tmp_path):
project = tmp_path / "pyproject.toml"
project.write_text('[project]\nversion = "0.1.1"\n')
assert image_release.project_release_version(project) == "v0.1.1"
assert image_release.validate_release_event("push", "refs/tags/v0.1.1", COMMIT, "v0.1.1") == "v0.1.1"
project.write_text('[project]\nversion = "0.1.2"\n')
assert image_release.project_release_version(project) == "v0.1.2"
assert image_release.validate_release_event("push", "refs/tags/v0.1.2", COMMIT, "v0.1.2") == "v0.1.2"
with pytest.raises(ValueError, match="project version"):
image_release.validate_release_event("push", "refs/tags/v0.1.2", COMMIT, "v0.1.1")
image_release.validate_release_event("push", "refs/tags/v0.1.3", COMMIT, "v0.1.2")
def test_installed_smoke_has_import_cli_exact_inventory_and_cleanup():
inventory = tuple(