|
3 | 3 |
|
4 | 4 | The *House Conventions* pages, under :file:`docs/source/contributing/conventions/`, |
5 | 5 | record the settled design rulings, and most of what they record is reasoning -- |
6 | | -which no test can check. Some of it is not: a per-class classification, a retired |
7 | | -name, an exception type. Those are the parts that rot silently, because Sphinx |
| 6 | +which no test can check. Some of it is not: a per-class classification, a forbidden |
| 7 | +role, an exception type. Those are the parts that rot silently, because Sphinx |
8 | 8 | builds without ``-W`` and without ``nitpicky``, so a page whose every factual claim |
9 | 9 | has gone stale still renders and CI still passes. |
10 | 10 |
|
|
31 | 31 | against the declarations themselves. ``tests/protocols/internet/test_ipv6_ext_unit.py`` |
32 | 32 | already pins the *code* to the ruling; nothing pinned the *page* to the code, which is |
33 | 33 | the half that goes stale when a new header lands. |
34 | | -* :class:`RetiredNameTests` -- the #924 ruling that the ``IPv6_GenericExt`` name goes for |
35 | | - good. A ruling that a name must not exist is exactly the kind a later change |
36 | | - reintroduces without noticing. |
37 | 34 | * :class:`FailedLookupExceptionTests` -- the worked example the page gives for a name |
38 | 35 | miss, which names :exc:`~pcapkit.utilities.exceptions.EnumKeyError`, not the |
39 | 36 | true but unspecific :exc:`KeyError` (#918). |
|
48 | 45 | * :class:`AenumRoleExclusionTests` -- GitHub issue #934 part C's ruling that |
49 | 46 | ``aenum`` cannot be cross-referenced at all (``conf.py`` excludes it: its |
50 | 47 | ``objects.inv`` carries no ``py:`` objects), converted to plain literals rather |
51 | | - than roles. A forbidden role needs a test or it comes back, exactly as |
52 | | - :class:`RetiredNameTests` guards a retired name. Pins the other half of the same |
53 | | - fix alongside it: the sentinel references #934 part B qualified stay |
54 | | - qualified, since none of ``AbsentType``, ``NoValueType`` or ``ABSENT`` resolves |
55 | | - unqualified outside :file:`docs/source/pcapkit/corekit/sentinels.rst`'s own module |
56 | | - context. Both checks scan every split page rather than one file, since either |
57 | | - could in principle land on any of them. |
| 48 | + than roles. A forbidden role needs a test or it comes back. Pins the other |
| 49 | + half of the same fix alongside it: the sentinel references #934 part B |
| 50 | + qualified stay qualified, since none of ``AbsentType``, ``NoValueType`` or |
| 51 | + ``ABSENT`` resolves unqualified outside |
| 52 | + :file:`docs/source/pcapkit/corekit/sentinels.rst`'s own module context. Both |
| 53 | + checks scan every split page rather than one file, since either could in |
| 54 | + principle land on any of them. |
58 | 55 |
|
59 | 56 | * :class:`ProcessConventionTests` -- the *process* rulings #918 harvested onto |
60 | 57 | :file:`process.rst`: what the ``all`` extra carries (#910), what a |
@@ -370,9 +367,7 @@ def test_the_index_preamble_does_not_claim_to_be_a_ruling_page_itself(self) -> ' |
370 | 367 | never needs that phrase, since every true statement about ruling content |
371 | 368 | here names a child page, or says "the pages below" / "here" for the set of |
372 | 369 | them. Paired with a positive check that the standing-instruction phrase is |
373 | | - present, rather than merely that the single-page one is absent, following |
374 | | - :class:`RetiredNameTests`'s two-sided pattern for a retired name elsewhere |
375 | | - in this module. |
| 370 | + present, rather than merely that the single-page one is absent. |
376 | 371 |
|
377 | 372 | """ |
378 | 373 | text = INDEX.read_text(encoding='utf-8') |
@@ -626,31 +621,6 @@ def test_the_page_agrees_with_the_test_that_pins_the_code(self) -> 'None': |
626 | 621 | set(IPv6ExtSharedBaseContractTests.STANDALONE_MEMBERS)) |
627 | 622 |
|
628 | 623 |
|
629 | | -class RetiredNameTests(unittest.TestCase): |
630 | | - """#924's ruling that ``IPv6_GenericExt`` goes: an unreleased intermediate name.""" |
631 | | - |
632 | | - def test_the_retired_base_name_is_absent_from_the_package(self) -> 'None': |
633 | | - """A ruling that a name must not exist needs a test, or it comes back. |
634 | | -
|
635 | | - Checked over the package source rather than by import, because the failure |
636 | | - this guards against is a *reintroduced alias* -- which would import perfectly |
637 | | - well and satisfy any behavioural assertion. |
638 | | -
|
639 | | - """ |
640 | | - offenders = [str(path.relative_to(ROOT)) |
641 | | - for path in sorted((ROOT / 'pcapkit').rglob('*.py')) |
642 | | - if 'IPv6_GenericExt' in path.read_text(encoding='utf-8')] |
643 | | - self.assertEqual(offenders, [], |
644 | | - 'the retired name is back; the ruling on GitHub pull request ' |
645 | | - '#924 is that it was an intermediate state and never released') |
646 | | - |
647 | | - def test_the_shared_base_still_carries_the_name_the_ruling_left(self) -> 'None': |
648 | | - """The other half: the name was renamed, not simply removed.""" |
649 | | - from pcapkit.protocols.internet.ipv6_ext import IPv6_Ext |
650 | | - |
651 | | - self.assertEqual(IPv6_Ext.__name__, 'IPv6_Ext') |
652 | | - |
653 | | - |
654 | 624 | class FailedLookupExceptionTests(unittest.TestCase): |
655 | 625 | """The worked example the page gives for a lookup that does not resolve.""" |
656 | 626 |
|
@@ -693,8 +663,7 @@ class AenumRoleExclusionTests(unittest.TestCase): |
693 | 663 | B converted every such role this page carried to plain double-backtick |
694 | 664 | literals rather than leaving them promising a link that can never exist. A |
695 | 665 | forbidden role needs a test, or a later edit reintroduces one without |
696 | | - noticing -- exactly the failure mode :class:`RetiredNameTests` guards a |
697 | | - retired name against. |
| 666 | + noticing. |
698 | 667 |
|
699 | 668 | The other half of the same fix is pinned alongside it: the references to |
700 | 669 | ``AbsentType``, ``NoValueType`` and ``ABSENT`` that part B qualified to their |
|
0 commit comments