Skip to content

docs(tests): fourth whole-repo pass over tests (#1103) - #1915

Merged
JarryShaw merged 3 commits into
mainfrom
docs/1103d-tests
Oct 19, 2026
Merged

JarryShaw merged 3 commits into
mainfrom
docs/1103d-tests

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

Please follow the guide below

What is the purpose of your pull request?

Tick the commit type your subject line carries.

  • fix — corrects a defect
  • feat — adds a feature
  • perf — changes performance, not behaviour
  • refactor — changes neither behaviour nor performance
  • test — tests only
  • docs — documentation only
  • ci — workflows or build tooling
  • release — bumps the version or rolls up a distribution
  • chore — anything else

The fourth whole-repo prose pass of #1103, over test prose. It changes prose only: every changed .py file's AST is unchanged once string expressions are blanked, except where a docstring is added or vendor template text is edited together with its generated const file.

Accuracy:

Counts:

  • reword codebase counts count-free in comments and docstrings, including
    the enum no-mint narrative and the arithmetic comment that no longer
    added up; the asserted constants carry the figures instead

Timed context:

  • drop "today", "currently" and "as of " where they added nothing

Prose only: an AST guard with docstrings blanked is identical on every file.

Refs #1103

Accuracy:
- correct the pyproject.toml lines the linktype-209 gate cites, and say
  that cron-vendor.yml does run that pin when a crawl changes a constant
- the MH default-argument cleanup comment no longer calls _missing_ loud
  or says it sets sys.tracebacklimit (#1845)
- the builtin-parity rationale accounts for get()'s _CaughtByCaller block
- conftest.py's docstring lists the session hooks it holds
- the PyPCAPFile marker note names the legs by version, PyPy included
- fix a "below" that pointed at a constant defined above it

Counts:
- reword codebase counts count-free in comments and docstrings, including
  the enum no-mint narrative and the arithmetic comment that no longer
  added up; the asserted constants carry the figures instead

Timed context:
- drop "today", "currently" and "as of <round>" where they added nothing

Prose only: an AST guard with docstrings blanked is identical on every file.

Refs #1103
@JarryShaw JarryShaw added docs Pull requests that change documentation only (docs: subject prefix) review: running A cross-review is in flight against the current head - no verdict yet labels Oct 19, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

NEEDS CHANGES at cd2c8f42e. In tests/const/test_const_linktype_209_unit.py, the pyproject.toml range stops mid-sentence; it should be :325-332. In tests/protocols/internet/test_mh_unit.py, the _drop_tracebacklimit comment adds "any more". The touched hunks also keep a few counts and some timed context ("the eight", "now reaches", "any more") in test_ipv6_ext_unit.py, test_fields_copy_dispatch_unit.py and test_const_enum_no_mint.py; drop them.

@JarryShaw JarryShaw added review: needs-changes Cross-review at the current head says changes are required; see the verdict comment and removed review: running A cross-review is in flight against the current head - no verdict yet labels Oct 19, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 19, 2026
- test_const_linktype_209_unit: cite the pyproject note as :325-332, and
  drop "since #849" for a plain issue cite.
- test_mh_unit: drop "any more" from the tracebacklimit cleanup comment.
- Drop remaining counts of codebase items and timed wording ("now",
  "any more", "no longer", "since #") from comments and docstrings in
  test_const_enum_no_mint, test_const_method_value_lookup_908_unit,
  test_const_registry_protocol, test_fields_copy_dispatch_unit,
  test_ipv6_ext_unit, test_option_generator_tcp_base_unit,
  test_docstring_contract and test_vendor_missing_body_unit.

Comments and docstrings only; the AST is unchanged.
@JarryShaw JarryShaw added review: running A cross-review is in flight against the current head - no verdict yet and removed review: needs-changes Cross-review at the current head says changes are required; see the verdict comment labels Oct 19, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

NEEDS CHANGES at aa5127de8. The three requested fixes are done, and every changed .py is still AST-identical to main. One rewrite now loses a fact. In tests/const/test_const_enum_no_mint.py:50, #860 step 2's PR 1 converted every one of those classes except AppType, which PR 2 converted later (see line ~107). "most" hides that, so name the exception rather than count it. Also drop "any more" from the comment at ~1488, in the same RulingConversionSourceTests block where the other one was removed.

@JarryShaw JarryShaw added review: needs-changes Cross-review at the current head says changes are required; see the verdict comment and removed review: running A cross-review is in flight against the current head - no verdict yet labels Oct 19, 2026
- test_const_enum_no_mint: say #860 step 2's PR 1 converted every bespoke
  class except AppType, rather than "most" of them.
- Drop "now" and "any more" from the RulingConversionSourceTests comment.

Comments and docstrings only; the AST is unchanged.
@JarryShaw JarryShaw added review: running A cross-review is in flight against the current head - no verdict yet and removed review: needs-changes Cross-review at the current head says changes are required; see the verdict comment labels Oct 19, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at 1ce9933e4. "Every one of those classes except AppType" checks out: the eight others are in BESPOKE_UNMINT_CONVERTED_REGISTRIES or covered by BespokeOpenVocabularyUnmintConvertedTests, PR 2 converted AppType, and CGAType is correctly outside the set. The comment block's claims hold on import. The file is AST-identical to main, and test_const_enum_no_mint.py passes.

@JarryShaw JarryShaw added review: good-to-go Cross-review at the current head says ready; CI state is separate and removed review: running A cross-review is in flight against the current head - no verdict yet labels Oct 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 90.07% (unit tier, Python 3.15, 1ce9933e4, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 2 20 2 96.77%
pcapkit/const 19595 881 2618 867 92.11%
pcapkit/corekit 2504 70 792 36 96.54%
pcapkit/dumpkit 276 3 100 3 98.40%
pcapkit/foundation 2916 164 1016 34 93.59%
pcapkit/interface 138 7 52 5 93.68%
pcapkit/protocols 17411 224 4580 189 98.10%
pcapkit/toolkit 872 177 298 8 77.18%
pcapkit/utilities 522 2 158 4 99.12%
pcapkit/vendor 4431 2341 1018 156 43.64%

Per-file detail: the coverage-html artifact of this run.

@JarryShaw
JarryShaw merged commit 150ba47 into main Oct 19, 2026
57 checks passed
@JarryShaw
JarryShaw deleted the docs/1103d-tests branch October 19, 2026 14:52
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 19, 2026
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Pull requests that change documentation only (docs: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant