← Back to team overview

launchpad-reviewers team mailing list archive

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

 

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

Commit message:
Run coverage via tox

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~jugmac00/lpcraft/+git/lpcraft/+merge/411796
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~jugmac00/lpcraft:add-coverage into lpcraft:main.
diff --git a/.gitignore b/.gitignore
index 1653024..23109b4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
 .python-version
 .tox
 __pycache__
+.coverage
diff --git a/setup.cfg b/setup.cfg
index 7481980..321826e 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -33,6 +33,8 @@ console_scripts =
 test =
     fixtures
     testtools
+    pytest
+    coverage
 
 [isort]
 known_first_party = lpcraft
diff --git a/tox.ini b/tox.ini
index 84625e5..3896a5b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -8,7 +8,6 @@ commands =
 deps =
     -r requirements.txt
     .[test]
-    pytest
 
 [testenv:lint]
 basepython =
@@ -36,3 +35,12 @@ deps =
     mypy
 commands =
     mypy --cache-dir="{envdir}/mypy_cache" --strict {posargs:lpcraft}
+
+[testenv:coverage]
+deps =
+    -r requirements.txt
+    .[test]
+commands =
+    coverage erase
+    coverage run -m pytest
+    coverage report -m  --fail-under=80