FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

unit-test BranchArcResolver directly by reaperhulk · Pull Request #2228 · coveragepy/coveragepy · GitHub

unit-test BranchArcResolver directly - #2228

Open
reaperhulk wants to merge 1 commit into
coveragepy:mainfrom
reaperhulk:claude/sysmon-resolver-tests
Open

unit-test BranchArcResolver directly#2228
reaperhulk wants to merge 1 commit into
coveragepy:mainfrom
reaperhulk:claude/sysmon-resolver-tests

Conversation

Copy link
Copy Markdown
Contributor

This PR was generated via claude but has undergone review before submission. However, we may want to iterate further before merging here.

The resolver runs inside the tracer, which causes coverage issues. This PR adds tests against resove() on 3.14+ where the sysmon core actually uses the resolver, plus an agreement test (3.13+) checking its raw byte-walking (CACHE and EXTENDED_ARG handling, jump-target arithmetic) against an independent dis-based reference on both destinations of every conditional jump in a corpus: the compiled source of argparse and dataclasses (~1250 branch pairs, expected arcs computed by the reference at runtime), plus four snippets guaranteeing match/case, async generators, except*, and EXTENDED_ARG-sized jumps.

The resolver runs inside the tracer, so nothing tested it directly.  Add
directed tests pinning each behavior of resolve()'s contract, running on
3.14+ where the sysmon core actually uses the resolver, plus an
agreement test (3.13+) checking its raw byte-walking (CACHE and
EXTENDED_ARG handling, jump-target arithmetic) against an independent
dis-based reference on both destinations of every conditional jump in a
corpus: the compiled source of argparse and dataclasses (~1250 branch
pairs, expected arcs computed by the reference at runtime), plus four
snippets guaranteeing match/case, async generators, except*, and
EXTENDED_ARG-sized jumps.  Because the compiler chooses freely between
jump-on-true and jump-on-false, the directed tests locate branches by
source line and, where polarity isn't pinned down, assert the set of
arcs from both destinations.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137DLbSXfm5v5bhCcz7xEKM
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL