tests.test_dep_report module¶
Golden renders and date-formatting checks for the shared report module.
Every dependency updater’s PR body is assembled from
repomatic.deps.dep_report, so the exact markdown these functions emit is a
user-visible contract shared by sync-uv-lock, sync-deps,
sync-dep-sources, the three version-sync bumpers, and audit --fix. The
tables are asserted verbatim rather than probed for substrings: a stray
column, a lost separator row, or a changed link shape is exactly the kind of
drift a in x assertion sails past.
- tests.test_dep_report.CHANGES = [('apricot', '1.2.0', '1.3.0'), ('blueberry', '', '0.4.1'), ('cherry', '2.0.0', '')]¶
One change of each shape: an upgrade, an addition, and a removal.
- tests.test_dep_report.test_format_diff_table_with_every_decoration()[source]¶
Released column, cooldown note, links, and a comparison URL together.
- tests.test_dep_report.test_format_diff_table_override_alone_forces_released_column()[source]¶
An override on a changed name turns the column on without upload times.
- tests.test_dep_report.test_format_diff_table_change_label_leads_the_comparison_link()[source]¶
A label sits outside the comparison link, so both stay clickable.
- tests.test_dep_report.test_build_held_back_without_a_date()[source]¶
A datasource that reports no date still yields a row, minus the dates.
- tests.test_dep_report.test_format_bypass_section_covers_every_lifecycle_state()[source]¶
Active, frozen, cleared, unreleased and unlocked entries share one table.
- tests.test_dep_report.test_format_bypass_section_warns_about_a_stale_comment()[source]¶
A cleared entry the table’s comment still names gets a warning.
- tests.test_dep_report.test_build_comparison_urls_skips_tagless_notes()[source]¶
A changelog-link fallback proves the tags do not exist: emit no URL.
fetch_release_notesfalls back to a bare changelog link (an empty tag) only when it found no GitHub release for the range. Guessing avprefix there put a 404 in the PR body.
- tests.test_dep_report.test_format_diff_table_call_sites_pass_reference_date()[source]¶
Every PR-report call site opts into the humanized
Releaseddelta.reference_datedrives the relative hint on theReleasedcolumn; a call site omitting it renders bare dates, asfix-vulnerable-depsonce did while the other dependency updaters showed the delta.
- tests.test_dep_report.test_format_release_notes_nests_headings()[source]¶
The h3 section holds h4 version headings, with upstream bodies below.
The section heading is an h3 so it nests under the PR body’s h2 update table, and the embedded upstream body’s own headings are demoted below the h4 version heading instead of colliding with the PR’s h2 sections.