tests.test_dev_release module

Tests for repomatic.github.dev_release: the rolling dev pre-release sync.

tests.test_dev_release.unreleased_changelog(tmp_path)[source]

A changelog on disk whose newest section is still unreleased.

tests.test_dev_release.patch_gh(**mock_kwargs)

The conftest patch_gh, bound to this module’s dispatch points.

tests.test_dev_release.test_sync_dev_release_dry_run(unreleased_changelog)[source]

Dry-run reports without calling gh.

tests.test_dev_release.test_sync_dev_release_live(unreleased_changelog)[source]

Live mode creates new draft pre-release when none exists.

tests.test_dev_release.test_sync_dev_release_edits_existing(unreleased_changelog)[source]

Edits existing release to preserve assets instead of delete+recreate.

tests.test_dev_release.test_sync_dev_release_cleans_stale_releases(unreleased_changelog)[source]

Stale dev releases from previous versions are cleaned up.

tests.test_dev_release.test_sync_dev_release_empty_body(tmp_path)[source]

Returns False when changelog section produces an empty body.

tests.test_dev_release.test_sync_dev_release_body_content(unreleased_changelog)[source]

Verifies the release body includes changelog changes.

tests.test_dev_release.test_cleanup_dev_releases_deletes_all_dev_tags()[source]

Deletes all releases whose tag ends with .dev0.

tests.test_dev_release.test_cleanup_dev_releases_no_dev_releases()[source]

No-op when no dev releases exist.

tests.test_dev_release.test_cleanup_dev_releases_list_failure()[source]

Silently succeeds when release listing fails.

tests.test_dev_release.test_cleanup_dev_releases_delete_failure()[source]

Continues cleaning when individual deletions fail.

tests.test_dev_release.test_cleanup_dev_releases_keeps_current_tag()[source]

Preserves the current version’s dev release when keep_tag is set.

tests.test_dev_release.test_delete_release_by_tag_success()[source]

Calls gh release delete with the given tag, and reports the deletion.

tests.test_dev_release.test_delete_release_by_tag_immutable()[source]

Silently succeeds for immutable published releases, reporting no deletion.

tests.test_dev_release.test_delete_release_by_tag_leaves_naming_to_the_caller(caplog)[source]

The generic helper never calls what it deleted a “dev release”.

tests.test_dev_release.test_delete_release_assets_success()[source]

Deletes assets and returns count.

tests.test_dev_release.test_delete_release_assets_no_release()[source]

Returns 0 when the release does not exist.

tests.test_dev_release.test_delete_release_assets_empty()[source]

Returns 0 when the release has no assets.

tests.test_dev_release.test_delete_release_assets_partial_failure()[source]

Continues when individual asset deletions fail.

tests.test_dev_release.test_upload_release_assets_success(tmp_path)[source]

Uploads matching files and skips unrelated ones.

tests.test_dev_release.test_upload_release_assets_no_files(tmp_path)[source]

Returns empty list and makes no gh calls when no matching files.

tests.test_dev_release.test_upload_release_assets_deletes_existing_first(tmp_path)[source]

Deletes existing assets before uploading new ones.

tests.test_dev_release.test_sync_dev_release_with_assets(unreleased_changelog, tmp_path)[source]

End-to-end: metadata sync + asset upload.

tests.test_dev_release.test_sync_dev_release_dry_run_with_assets(unreleased_changelog, tmp_path)[source]

Dry-run previews asset files without making gh calls.