Skip to content

docs(tests): tighten the foundation and corekit test prose from the post-sweep merges (#719) - #1072

Merged
JarryShaw merged 1 commit into
mainfrom
docs/719-final-foundation-corekit
Oct 6, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
docs/719-final-foundation-corekit

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly

  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])

  • Use Preview tab to see how your pull request will actually look like

  • Searched for similar pull requests

  • Followed the coding style (make pylint, make mypy, make isort) — not run; comment-only change, AST guard below

  • make test passes, and a test case covers the change — the four touched modules and tests/project, one process each

  • Added a changelog entry under docs/source/changelog/ and regenerated CHANGELOG.md, if the change is user-visible — N/A — centralised in docs(changelog): shared 1.5.0 changelog — long-lived, merges last (#610, #616, #617, #618, #620) #657

What is the purpose of your pull request?

  • docs — documentation only

Description of your pull request and other information

Final #719 pass over tests/foundation/** and tests/corekit/** prose added by the commits since ef0964c81. Comments only.

  • Drops "used to" / "no longer" history from the tests: stop re-importing pcapkit before every test (purge_modules dominates suite time) #1065 comments in test_extraction.py and test_fields_collections.py, keeping the reason (the class shares one import).
  • test_fields_field.py: the ledger comment blamed "a sibling class, another module"; each class purges first, so its field module (and _zero_pad_ledger) is its own. The leak is from earlier tests of the same class.
  • test_foundation.py: setUp does not swap in a fresh import for every test, it puts the class's own one back.
File AST equal
tests/corekit/test_fields_collections.py True
tests/corekit/test_fields_field.py True
tests/foundation/registry/test_foundation.py True
tests/foundation/test_extraction.py True

@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 6, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Cross-review verdict on a4d12fbff: GOOD TO GO (ran on Sonnet; author Opus)

  • No code changed: the AST of all 4 files is identical to efc9c3774 once bare strings are stripped.
  • The three reworded claims hold against tests/_support.reimport_once_per_class:
    • the class-shared ledger
    • "puts the class's own import in sys.modules"
    • per-class tables restored
  • The deleted "sibling class, another module" clause had become false after tests: stop re-importing pcapkit before every test (purge_modules dominates suite time) #1065.
  • Tests pass: the 4 touched modules, the same 4 run together in one process (76 passed), and tests/project (375 passed, 1 skipped).
  • UNVERIFIED: no actual pytest-xdist run.

@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 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Coverage: 88.74% (unit tier, Python 3.14, a4d12fbff, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 4 20 4 93.55%
pcapkit/const 18757 1035 2342 846 90.23%
pcapkit/corekit 1874 91 578 22 94.33%
pcapkit/dumpkit 136 0 40 0 100.00%
pcapkit/foundation 2422 143 842 34 92.62%
pcapkit/interface 112 7 40 5 92.11%
pcapkit/protocols 15653 187 3942 162 98.19%
pcapkit/toolkit 487 71 144 3 84.15%
pcapkit/utilities 429 4 122 4 98.55%
pcapkit/vendor 4409 2359 1006 158 42.84%

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

@JarryShaw
JarryShaw merged commit 0d793f3 into main Oct 6, 2026
41 checks passed
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 6, 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