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

Add trailing newline to markdown report #1936

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

rgryta
Copy link

@rgryta rgryta commented Mar 12, 2025

Without trailing newline in a markdown report, the first additional information that comes from cmdline handler will end up in an additional row below the TOTALs row.

E.g. Coverage failure: https://github.com/nedbat/coveragepy/blob/master/coverage/cmdline.py#L761

rgryta added 2 commits March 12, 2025 16:58
Without trailing newline in a markdown report, the first additional information that comes from cmdline handler will end up in an additional row below the TOTALs row.

E.g. Coverage failure: https://github.com/nedbat/coveragepy/blob/master/coverage/cmdline.py#L761
@nedbat
Copy link
Owner

nedbat commented Mar 15, 2025

Will you be fixing the failing tests?

@rgryta
Copy link
Author

rgryta commented Mar 15, 2025

Will you be fixing the failing tests?

Hi, yes. Haven't had time to work on them this weekend. I'll change the last_line assertions to second_last_line.
Unless they'd be better implemented in some other way? Like adding a deletion of all last lines that are empty before performing TOTALS line assertions?

I can add those changes in any way tbh.

@nedbat
Copy link
Owner

nedbat commented Mar 15, 2025

I think I'd change the last_line_squeezed function to return the last non-blank line. Line count assertions can be incremented.

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