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

Record and show contexts when using coverage #11518

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on May 2, 2024

  1. Record and show contexts when using coverage

    As documented in https://coverage.readthedocs.io/en/7.5.0/contexts.html#dynamic-contexts
    
    While working on tiangolo#11517 I wanted to see which test
    is best to modify for the fix.
    One way to easily find this out is to see which line is covered
    by which test.
    
    This PR adds a dynamic context setting
    and makes them show on the HTML coverage report.
    The contexts are test function names.
    
    NOTE pytest-cov plugin has even better support
    for pytest test names as coverage contexts,
    but I think this PR is already an imporovement.
    slafs committed May 2, 2024
    Configuration menu
    Copy the full SHA
    84bc7c6 View commit details
    Browse the repository at this point in the history