← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~jugmac00/lpcraft:add-html-coverage into lpcraft:main

 

Jürgen Gmach has proposed merging ~jugmac00/lpcraft:add-html-coverage into lpcraft:main.

Commit message:
Add HTML coverage and contexts

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~jugmac00/lpcraft/+git/lpcraft/+merge/412002

Contexts show which line was ran by which tests.

More info
https://jugmac00.github.io/blog/enrich-test-coverage-with-contexts/
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~jugmac00/lpcraft:add-html-coverage into lpcraft:main.
diff --git a/.coveragerc b/.coveragerc
new file mode 100644
index 0000000..b233f3d
--- /dev/null
+++ b/.coveragerc
@@ -0,0 +1,5 @@
+[html]
+show_contexts = true
+
+[run]
+dynamic_context = test_function
diff --git a/.gitignore b/.gitignore
index 23109b4..703c45f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
 .tox
 __pycache__
 .coverage
+htmlcov
diff --git a/tox.ini b/tox.ini
index 5f4f7ba..bc6d96b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -44,6 +44,7 @@ deps =
 commands =
     coverage erase
     coverage run -m pytest
+    coverage html
     coverage report -m  --fail-under=80
 
 [testenv:setup-cfg-fmt]

Follow ups