@@ -252,7 +252,7 @@ def test_rule_6_collapses_blank_runs_and_drops_a_leading_one(self) -> None:
252252 # structurally rather than collapsed afterwards by a ``\n{3,}`` substitution
253253 # over the joined text. Same answer between blocks -- a run of blank lines
254254 # is one paragraph break however long it is -- and a better one before the
255- # first block, where the substitution used to leave two empty lines.
255+ # first block, where such a substitution leaves two empty lines.
256256 markdown = self .convert (
257257 '\n \n 9.9.9 -- 2026-01-02\n ===================\n \n \n \n '
258258 'One paragraph.\n \n \n Another.\n '
@@ -593,26 +593,24 @@ def test_a_simple_table_is_fatal(self) -> None:
593593 )
594594
595595 def test_a_sub_heading_underline_joined_into_the_prose_is_fatal (self ) -> None :
596- # Retargeted from ``-`` to ``^``. Rule 1 used to consume ``=`` alone, so a
597- # ``-`` underlined sub-heading was joined onto its heading text by rule 6 and
598- # would have vanished into a paragraph -- which is what this rejected. The
599- # by-module changelog restructure made ``-`` and ``~`` real heading levels
600- # that rule 1 now converts, so the old input converts cleanly and **this test
601- # failed**: ``_reject`` is built on ``assertRaises(ResidualMarkupError)``, and
602- # nothing raises any more. The retarget was required to keep the guard
603- # exercised, not a tidy-up of a weak assertion. ``^`` is still outside rule 1's
604- # level map while remaining in ``_RESIDUAL``'s alternation, so it tests the
605- # same guard on a character the converter genuinely does not handle.
596+ # ``^``, not ``-``: an underline rule 1 does not convert is joined onto its
597+ # heading text by rule 6 and would vanish into a paragraph, which is what this
598+ # rejects. The by-module changelog makes ``-`` and ``~`` real heading levels
599+ # that rule 1 converts, so a ``-`` sub-heading converts cleanly and would leave
600+ # ``_reject``, built on ``assertRaises(ResidualMarkupError)``, with nothing to
601+ # raise. ``^`` is outside rule 1's level map while remaining in
602+ # ``_RESIDUAL``'s alternation, so it exercises the guard on a character the
603+ # converter genuinely does not handle.
606604 self ._reject ('\n A sub heading\n ^^^^^^^^^^^^^\n \n Some prose.\n ' ,
607605 'setext underline joined' )
608606
609607 def test_the_two_new_sub_heading_levels_become_atx_headings (self ) -> None :
610- # The other half of the same change : ``-`` and ``~`` must now *convert*
611- # rather than be rejected, one ATX level deeper each, so that the by-module
612- # sections and their Added/Changed/Fixed subsections survive into
613- # ``CHANGELOG.md``. Against the old converter this does not reach the
614- # assertions at all -- ``render()`` raises ``ResidualMarkupError`` on the
615- # joined ``A module --------`` first, which is what makes this a real check
608+ # The other half: ``-`` and ``~`` *convert* rather than being rejected, one
609+ # ATX level deeper each, so that the by-module sections and their
610+ # Added/Changed/Fixed subsections survive into ``CHANGELOG.md``. Against a
611+ # converter that handles ``=`` alone this does not reach the assertions at
612+ # all -- ``render()`` raises ``ResidualMarkupError`` on the joined
613+ # ``A module --------`` first, which is what makes this a real check
616614 # rather than a restatement of current behaviour.
617615 index = self .make_tree (
618616 entry = ENTRY + '\n A module\n --------\n \n Added\n ~~~~~\n \n Some prose.\n ' )
@@ -625,10 +623,11 @@ def test_the_two_new_sub_heading_levels_become_atx_headings(self) -> None:
625623 self .assertNotIn ('Added ~~~~~' , rendered )
626624
627625 def test_an_over_long_sub_heading_underline_is_fatal (self ) -> None :
628- # ``_RESIDUAL``'s comment now claims ``=``, ``-`` and ``~`` all need to stay in
626+ # ``_RESIDUAL``'s comment claims ``=``, ``-`` and ``~`` all need to stay in
629627 # its alternation, because rule 1 fires only on an *exact* length match while
630- # reStructuredText merely requires the underline to be no shorter. Only ``=``
631- # was pinned, so the other two thirds of that claim rode on the comment alone.
628+ # reStructuredText merely requires the underline to be no shorter. The test
629+ # below pins ``=``; this pins the other two, so no part of that claim rides on
630+ # the comment alone.
632631 for underline in ('-' * 18 , '~' * 18 ):
633632 with self .subTest (underline = underline [0 ]):
634633 self ._reject (f'\n A sub heading\n { underline } \n \n Some prose.\n ' ,
@@ -722,8 +721,8 @@ def test_a_cited_line_holds_the_construct_it_was_cited_for(self) -> None:
722721 f'line { number } of the entry does not hold the cited construct' )
723722
724723 def test_a_cited_line_can_lie_past_the_end_of_the_converted_body (self ) -> None :
725- # The bound that made the old numbers provably wrong: they were counted in
726- # the body, so they could never reach a construct written below it.
724+ # The bound that makes body-counted line numbers provably wrong: counted in
725+ # the body, they could never reach a construct written below it.
727726 entry = padded_entry ('and then :term:`sys.modules` at the very end.' )
728727 body = changelog_md .convert (entry )
729728
0 commit comments