Skip to content

Highlight my code vs framework code in tracebacks #522

Closed
@pytestbot

Description

@pytestbot

Originally reported by: Thomas Güttler (BitBucket: thomas-guettler, GitHub: thomas-guettler)


it would be very cool if pytest could highlight my code in tracebacks. This would make it much easier for the developers eyes to find the buggy code line.

In 98% percent of all tracebacks I get, the bug is in my code, not in one of the many external libraries.

Of course it needs some kind of heuristic to decide if a traceback line is from my code or from a library/framework.

Some time ago this was implemented in django, and I liked it very much: You find the important code lines much faster. Since we changed your development style to test driven development, we don't see django tracebacks any more. We use pytest now.

See https://code.djangoproject.com/ticket/11834

This is a feature request. My pytest knowledge is not very good. I think someone else would be much faster.

Which steps should be done to implement this?


Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: tracebacksrelated to displaying and handling of tracebackstype: enhancementnew feature or API change, should be merged into features branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions