feat: Update version to 0.9.1, enhance release notes generation, and add changelog
Some checks are pending
Tests & Quality Checks / Test on Python 3.11 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.10 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-2 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-2 (push) Waiting to run
Tests & Quality Checks / Build Artifacts (push) Blocked by required conditions
Tests & Quality Checks / Build Artifacts-1 (push) Blocked by required conditions
Some checks are pending
Tests & Quality Checks / Test on Python 3.11 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.10 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-2 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-2 (push) Waiting to run
Tests & Quality Checks / Build Artifacts (push) Blocked by required conditions
Tests & Quality Checks / Build Artifacts-1 (push) Blocked by required conditions
This commit is contained in:
parent
55f2ddf4b1
commit
1054266d0e
7 changed files with 150 additions and 17 deletions
46
tests/unit/test_version_utils.py
Normal file
46
tests/unit/test_version_utils.py
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
"""Tests for build script version utilities."""
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "build" / "scripts"))
|
||||
|
||||
from version_utils import get_release_notes
|
||||
|
||||
|
||||
class TestReleaseNotes:
|
||||
"""Test release note extraction for published releases."""
|
||||
|
||||
def test_get_release_notes_from_changelog(self, tmp_path):
|
||||
"""Extract only the selected version section from the changelog."""
|
||||
changelog = tmp_path / "CHANGELOG.md"
|
||||
changelog.write_text(
|
||||
"""## [0.9.1] - 2026-04-15
|
||||
|
||||
### Added
|
||||
- Better update text
|
||||
- New installer checks
|
||||
|
||||
### Fixed
|
||||
- Upload retries
|
||||
|
||||
## [0.9.0] - 2026-04-01
|
||||
|
||||
### Added
|
||||
- Older changes
|
||||
""",
|
||||
encoding="utf-8",
|
||||
)
|
||||
|
||||
notes = get_release_notes("0.9.1", project_root=tmp_path)
|
||||
|
||||
assert "Better update text" in notes
|
||||
assert "New installer checks" in notes
|
||||
assert "Older changes" not in notes
|
||||
|
||||
def test_get_release_notes_uses_fallback_when_missing(self, tmp_path):
|
||||
"""Return a readable fallback when no changelog entry exists."""
|
||||
notes = get_release_notes("0.9.1", project_root=tmp_path)
|
||||
|
||||
assert "WebDrop Bridge v0.9.1" in notes
|
||||
assert "release package" in notes.lower()
|
||||
Loading…
Add table
Add a link
Reference in a new issue