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
pip install coverage==5.0b1
pip install pytest-cov
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
Execute context report to include extra context data into coverage html script
python ./app/coverage_context_report.py