Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect missed-branch message with return/finally/if #1775

Closed
nedbat opened this issue May 5, 2024 · 1 comment
Closed

Incorrect missed-branch message with return/finally/if #1775

nedbat opened this issue May 5, 2024 · 1 comment
Labels
branch bug Something isn't working fixed

Comments

@nedbat
Copy link
Owner

nedbat commented May 5, 2024

Describe the bug
In the scriv coverage results, I see this:

image

The message says the return on 165 wasn't executed, but it is clearly marked as executed. The message should say, "Line 167 didn't return because the condition on 167 was always true."

To Reproduce

  1. Check out the scriv repo: https://github.com/nedbat/scriv
  2. Install the requirements: make requirements
  3. Run tox: tox
  4. Open the HTML report in htmlcov/index.html, navigate to the end of src/scriv/format_rst.py
@nedbat nedbat added bug Something isn't working needs triage branch labels May 5, 2024
nedbat added a commit that referenced this issue May 31, 2024
nedbat added a commit that referenced this issue Dec 27, 2024
@nedbat
Copy link
Owner Author

nedbat commented Dec 27, 2024

Now it says "line 6 didn't jump to the function exit" which is vague but not inaccurate. Test added in commit 9b1ab97.

@nedbat nedbat closed this as completed Dec 27, 2024
@nedbat nedbat added the fixed label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

1 participant