generate_changelog() defined all_authors and teknium_aliases inside the 'if not no_changelog' block but read them after it. The canary tests stub generate_changelog, so nothing ran the real path.
18 lines
786 B
Python
18 lines
786 B
Python
"""--no-changelog keeps the release body's frame and drops the commit sections."""
|
|
|
|
|
|
def test_no_changelog_keeps_the_frame_without_commit_sections():
|
|
from scripts import release
|
|
|
|
commits = [{
|
|
"sha": "a" * 40, "short_sha": "a" * 8, "author_name": "Dev", "author_email": "dev@example.test",
|
|
"subject": "feat: something (#5)", "category": "features", "github_author": "@dev", "coauthors": [],
|
|
}]
|
|
|
|
body = release.generate_changelog(commits, "rc.1-v1.2.4", "1.2.4", repo_url="https://github.com/o/r",
|
|
prev_tag="v1.2.3", no_changelog=True)
|
|
|
|
assert "Something" not in body and "@dev" not in body
|
|
assert "<!-- HERMES_BUILDS_TABLE -->" in body
|
|
assert "https://github.com/o/r/compare/v1.2.3...rc.1-v1.2.4" in body
|