Skip to content

Print uncovered lines #691

@gsganden

Description

@gsganden

--cov-report=term-missing tells us which line numbers aren’t covered, but you still have to open the file to see the actual code. Could we add a flag (something like --show-code) that prints the uncovered lines themselves right after the tests finish?

This feature would be particularly useful for using code-gen tools to fill testing gaps because LLM-based tools are not good at finding lines by number (https://gandenberger.org/posts/2025-05-07_llm-test-coverage/). It would also mimic how many linting tools such ruff behave.

I'd be happy to contribute a pull request if there is interest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions