Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 #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.
- Loading branch information