Repository navigation
test: import pcapkit once per class in TCPHTTPDispatchTests - #2611
Merged
Merged
Conversation
- TCPHTTPDispatchTests.setUp calls reimport_once_per_class(self) in place of a per-test purge_modules(['pcapkit']); its tests read TCP.__proto__ and parse fixed bytes, so none needs an import of its own. - test-coverage.rst's "Import once per class" bullet records the per-test form: purge in setUp instead of calling the helper, with a comment saying why, as ConstEnumRegisterFallbackTests does, and names test_per_class_import_guard.py as the check on undoing the helper.
Owner
Author
|
GOOD TO GO at |
Contributor
|
Coverage: 94.03% (unit tier, Python 3.15,
Per-file detail: the |
JarryShaw
added a commit
that referenced
this pull request
Nov 2, 2026
…s latest wave into 1.6.0 (#2449) - Added: every whole HTTP/2 frame in a TCP segment is a further HTTPv2 layer, the previous frame's payload, as with TLS (#2609). - Folded into unreleased entries: SSLv3 lives in pcapkit.protocols.application.sslv3 (#2602), and a reassembled DTLS Datagram's packet holds the deferred handshake decode (#2605). tls.SSLv3 is in no release tag, so the entry records no move. - Changed: the remaining xdist jobs at -n logical (#2606) join the CI entry, and the member-order entry cites the last reorder (#2613). - No entry for the test-only #2611 and #2612, or for #2610's private registry sentinel, which changes no behaviour. - CHANGELOG.md regenerated; util/changelog_md.py --check passes.
1 of 5 tasks
JarryShaw
added a commit
that referenced
this pull request
Nov 2, 2026
…6.0 (#2449) - Folded into the TLS/DTLS entry: the hello and EncryptedExtensions extension lists, their registered body decoders, register_tls_extension and the pcapkit.const.tls extension types (#2595), and each whole DTLS record in a datagram as a further layer (#2603). - The conventions entry records #2611's per-test purge rule; the member-order entry cites #2491. - No entry for #2595's private ProtocolBase value helpers, as for the other private API. - CHANGELOG.md regenerated; util/changelog_md.py --check passes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
test— tests onlyDescription of your pull request and other information
TCPHTTPDispatchTests.setUpnow callsreimport_once_per_class(self)instead of purgingpcapkitbefore every test. Its tests readTCP.__proto__and parse fixed bytes, so none of them needs a fresh import. A deliberately broken dispatcher still fails the module.test-coverage.rst's "Import once per class" bullet now records the per-test form: purge in
setUpwith a comment saying why, asConstEnumRegisterFallbackTestsdoes. It also namestest_per_class_import_guard.pyas the check that catches the helper being undone.Open to the owner: should the rule that a per-test purge states its reason be enforced by extending
test_per_class_import_guard? Recommended: leave it as a written rule for now.Closes #2562