Skip to content

test(protocols): drop test_mh_unit's dead tracebacklimit cleanup (#1924) - #1937

Merged
JarryShaw merged 1 commit into
mainfrom
test/1924-drop-tracebacklimit-cleanup
Oct 19, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
test/1924-drop-tracebacklimit-cleanup

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

This drops test_mh_unit's _drop_tracebacklimit cleanup and the import sys that only it used. Since #362, no pcapkit code sets sys.tracebacklimit: git grep finds only docstrings. The cleanup also deleted the attribute whenever it existed, which would remove a value the test runner had set. The test files that do touch sys.tracebacklimit save and restore it themselves.

Closes #1924

- Remove the `_drop_tracebacklimit` cleanup and its comment: no pcapkit
  code sets `sys.tracebacklimit` since #362, and deleting the attribute
  whenever present would wipe a value the test runner had set.
- Remove the method-local `import sys`, now unused.

Closes #1924
@JarryShaw JarryShaw added review: running A cross-review is in flight against the current head - no verdict yet test Pull requests that add or correct tests (test: subject prefix) labels Oct 19, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at 66c87dc71. A Sonnet cross-review read every tracebacklimit hit in pcapkit/. All five are prose in utilities/exceptions.py, and the trim rule goes through tbtrim, which never touches it. sys has no other use in the method. test_mh_unit.py passes run before and run after the files that do set sys.tracebacklimit (227 passed in each order). The commit is the one 13-line deletion.

@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
@JarryShaw
JarryShaw merged commit 3c67a38 into main Oct 19, 2026
13 checks passed
@JarryShaw
JarryShaw deleted the test/1924-drop-tracebacklimit-cleanup branch October 19, 2026 15:22
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 19, 2026
@JarryShaw JarryShaw moved this to Done in PyPCAPKit Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Pull requests that add or correct tests (test: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

test(protocols): test_mh_unit's _drop_tracebacklimit cleanup has been dead since #362

1 participant