Skip to content

sansalinas/coverage-context-report

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coverage-context-report

Python project to include context into coverage html report. This script generate required js content to be included into default coverage_html.js script file, it shows contexts used by each line and allow identify different code lines reached by each unit test

Requirements

Install coverage 5

pip install coverage==5.0b1

Install pytest-cov

pip install pytest-cov

How to generate it

Step 1

Generate coverage data file (.coverage) and html report, .coverage file will be used by context report script to generate the extra script data that will be used to show coverage lines by context

pytest --cov=code_demo --cov-context=test test/ --cov-report html

Step 2

Execute context report to include extra context data into coverage html script

python ./app/coverage_context_report.py

Example Screenshots

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published