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

Handle loop-completion arc before function exit by itscloud0 · Pull Request #2204 · coveragepy/coveragepy · GitHub

Handle loop-completion arc before function exit - #2204

Open
itscloud0 wants to merge 2 commits into
coveragepy:mainfrom
itscloud0:fix-2168-ctrace-loop-branch
Open

Handle loop-completion arc before function exit#2204
itscloud0 wants to merge 2 commits into
coveragepy:mainfrom
itscloud0:fix-2168-ctrace-loop-branch

Conversation

itscloud0 commented Jun 22, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Summary

  • fix the missing loop-completion arc on Python 3.14 when a break exits the final loop iteration immediately before function return
  • apply the same correction in both the C tracer and Python tracer
  • add a focused regression covering the break case

Problem

Fixes #2168.

coverage report -m could show a missing branch after a break-driven loop exit on Python 3.14 even though the code path was executed.

Solution

Record the current line as the final arc before emitting the function-exit arc when returning from a loop-completion path.

itscloud0 marked this pull request as ready for review June 22, 2026 21:07
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.

3.14: uncovered branch for loop completion with break

1 participant


Back | FazBrowse Home | New Git URL