← Về thư mục
scripts/test_check_changelog_covers_merges.py
- PrNumberTest · class · L27-L46 — class PrNumberTest(unittest.TestCase)
- test_trailing_pr_is_identity · method · L28-L29 — def test_trailing_pr_is_identity(self)
- test_mid_subject_ref_ignored_when_trailing_present · method · L31-L35 — def test_mid_subject_ref_ignored_when_trailing_present(self): # #89 is a tracking issue mid-subject; #429 is the PR (trailing).
- test_no_trailing_pr_returns_none · method · L37-L38 — def test_no_trailing_pr_returns_none(self)
- test_mid_ref_only_is_not_identity · method · L40-L42 — def test_mid_ref_only_is_not_identity(self): # a number that is NOT a trailing (#N) does not count as the PR
- test_bare_hash_without_parens_is_none · method · L44-L46 — def test_bare_hash_without_parens_is_none(self): # a #N without the surrounding parens is not a PR identity
- AllRefsTest · class · L49-L72 — class AllRefsTest(unittest.TestCase)
- test_collects_issue_and_pr · method · L52-L56 — def test_collects_issue_and_pr(self): # mid-subject issue ref + trailing PR are both refs
- test_umbrella_and_pr · method · L58-L61 — def test_umbrella_and_pr(self)
- test_single_trailing · method · L63-L64 — def test_single_trailing(self)
- test_no_refs_is_empty · method · L66-L67 — def test_no_refs_is_empty(self)
- test_bare_hash_counts_as_ref · method · L69-L72 — def test_bare_hash_counts_as_ref(self): # all_refs is liberal (any #N); the # is still required
- IsExemptTest · class · L75-L118 — class IsExemptTest(unittest.TestCase)
- test_exempt_types · method · L76-L84 — def test_exempt_types(self)
- test_exempt_internal_docs_scopes · method · L86-L88 — def test_exempt_internal_docs_scopes(self)
- test_exempt_release_mechanics_docs_scope · method · L90-L93 — def test_exempt_release_mechanics_docs_scope(self): # docs(release): the once-per-release alignment/promotion commit IS the # changelog being written — it cannot cite itself (§0.2).
- test_i18n_docs_required · method · L95-L98 — def test_i18n_docs_required(self): # Translation changes are user-facing docs like any other (codex P2): # exempting docs(i18n) would let them slip through undocumented.
- test_required_prefixes · method · L100-L110 — def test_required_prefixes(self)
- test_breaking_marker_and_case_sensitivity · method · L112-L118 — def test_breaking_marker_and_case_sensitivity(self): # breaking-change "!" marker must not disturb scope parsing
- IsCoveredTest · class · L121-L136 — class IsCoveredTest(unittest.TestCase)
- test_covered_exact · method · L124-L125 — def test_covered_exact(self)
- test_token_boundary_no_substring_match · method · L127-L129 — def test_token_boundary_no_substring_match(self): # #42 must NOT be "covered" by #432 in the text
- test_uncovered · method · L131-L132 — def test_uncovered(self)
- test_requires_hash_prefix · method · L134-L136 — def test_requires_hash_prefix(self): # a bare "432" (no #) in prose must not count
- AuditTest · class · L139-L210 — class AuditTest(unittest.TestCase)
- test_required_covered_passes · method · L140-L143 — def test_required_covered_passes(self)
- test_required_uncovered_fails · method · L145-L151 — def test_required_uncovered_fails(self)
- test_exempt_skipped_even_if_uncovered · method · L153-L155 — def test_exempt_skipped_even_if_uncovered(self)
- test_no_ref_at_all_is_unverifiable · method · L157-L163 — def test_no_ref_at_all_is_unverifiable(self): # §0.1: unverifiable means NO #N anywhere in the subject (not "no trailing PR").
- test_issue_ref_covers_even_when_pr_does_not · method · L165-L170 — def test_issue_ref_covers_even_when_pr_does_not(self): # §0.1 core: CHANGELOG cites the ISSUE (#393); the trailing PR (#400) is # absent. ANY ref covering is enough — this must PASS.
- test_uncovered_when_no_ref_is_in_unreleased · method · L172-L179 — def test_uncovered_when_no_ref_is_in_unreleased(self): # neither the issue #393 nor the PR #400 is documented -> fail; the # trailing PR is the display id.
- test_revert_covered_by_either_ref_passes · method · L181-L186 — def test_revert_covered_by_either_ref_passes(self): # §0.1: a revert carries both the reverted PR (#432) and the revert PR # (#433); coverage by EITHER counts (accepted loosening, §3.5).
- test_revert_uncovered_when_neither_ref_present · method · L188-L192 — def test_revert_uncovered_when_neither_ref_present(self)
- test_mixed_list_accumulates_in_order · method · L194-L210 — def test_mixed_list_accumulates_in_order(self)
- ExtractUnreleasedTest · class · L213-L232 — class ExtractUnreleasedTest(unittest.TestCase)
- test_extracts_only_unreleased_body · method · L226-L229 — def test_extracts_only_unreleased_body(self)
- test_missing_unreleased_returns_none · method · L231-L232 — def test_missing_unreleased_returns_none(self)
- _git · function · L246-L253 — def _git(repo: Path, *args: str) -> str
- _commit · function · L256-L259 — def _commit(repo: Path, subject: str) -> None
- ExtractCoverageTextTest · class · L262-L307 — class ExtractCoverageTextTest(unittest.TestCase)
- test_window_spans_unreleased_and_promoted_sections · method · L281-L284 — def test_window_spans_unreleased_and_promoted_sections(self)
- test_window_excludes_previous_release_and_below · method · L286-L291 — def test_window_excludes_previous_release_and_below(self)
- test_missing_previous_heading_returns_none · method · L293-L295 — def test_missing_previous_heading_returns_none(self): # Fail-closed: no silent widening of the window to the whole file.
- test_version_dots_not_regex_wildcards · method · L297-L300 — def test_version_dots_not_regex_wildcards(self): # [3.14.0] must not be matched by a heading like [3.14x0].
- test_boundary_heading_line_itself_is_excluded · method · L302-L307 — def test_boundary_heading_line_itself_is_excluded(self): # A #N on the previous release's OWN heading line is released history, # not coverage (codex P3 pin: slice ends BEFORE the heading line).
- GitInterfaceTest · class · L310-L349 — class GitInterfaceTest(unittest.TestCase)
- _repo · method · L311-L317 — def _repo(self, stack)
- test_previous_tag_and_subjects · method · L319-L332 — def test_previous_tag_and_subjects(self)
- test_non_v_tags_ignored · method · L334-L342 — def test_non_v_tags_ignored(self)
- test_no_tags_returns_none · method · L344-L349 — def test_no_tags_returns_none(self)
- CliEndToEndTest · class · L352-L509 — class CliEndToEndTest(unittest.TestCase)
- _make_repo · method · L353-L363 — def _make_repo(self, stack, changelog_body)
- _add_commit · method · L365-L368 — def _add_commit(self, repo, env, subject)
- test_pass_when_covered · method · L370-L377 — def test_pass_when_covered(self)
- test_fail_when_uncovered · method · L379-L387 — def test_fail_when_uncovered(self)
- test_fail_closed_no_previous_tag · method · L389-L401 — def test_fail_closed_no_previous_tag(self)
- test_first_release_flag_passes · method · L403-L413 — def test_first_release_flag_passes(self)
- test_fail_when_changelog_missing · method · L415-L428 — def test_fail_when_changelog_missing(self)
- test_fail_when_no_unreleased_section · method · L430-L438 — def test_fail_when_no_unreleased_section(self)
- test_pass_when_covered_by_promoted_section · method · L440-L451 — def test_pass_when_covered_by_promoted_section(self): # §0.2: the release-prep PR promotes [Unreleased] into [3.13.0] before # the tag exists; entries there must still count as coverage.
- test_stale_mention_below_boundary_does_not_cover · method · L453-L464 — def test_stale_mention_below_boundary_does_not_cover(self): # §0.2 fail-closed precision: a #N in already-released history must not # cover a new commit that reuses the number.
- test_fail_when_previous_release_heading_missing · method · L466-L476 — def test_fail_when_previous_release_heading_missing(self): # Tag v3.12.0 exists but CHANGELOG has no [3.12.0] heading: fail loud, # never silently widen the window to the whole file.
- test_bad_merges_ref_fails_closed · method · L478-L489 — def test_bad_merges_ref_fails_closed(self): # A typo'd --merges-ref (or missing origin/main in CI) must FAIL, not # silently pass as an empty range (codex P1: fail-open reproduced).
- test_merges_ref_bounds_audited_range · method · L491-L509 — def test_merges_ref_bounds_audited_range(self): # CI on a release-prep PR audits ..origin/main, not the prep # branch's own in-flight commits.