From bdc6a99fb71195cb0a2fb66dddd3d31801c08c6b Mon Sep 17 00:00:00 2001
From: Dominik George <dominik.george@teckids.org>
Date: Fri, 13 Dec 2019 10:56:29 +0100
Subject: [PATCH] [Tests] Re-enable pytest-cov now we run under poetry again

---
 poetry.lock    | 34 ++++++++++++++++++++++++++++++++--
 pyproject.toml |  2 +-
 tox.ini        |  3 +--
 3 files changed, 34 insertions(+), 5 deletions(-)

diff --git a/poetry.lock b/poetry.lock
index 725eb03ca..6885d4c42 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -515,6 +515,18 @@ django-phonenumber-field = ">=1.1.0,<4.99"
 django_otp = ">=0.6.0,<0.99"
 qrcode = ">=4.0.0,<6.99"
 
+[package.dependencies.django-otp-yubikey]
+optional = true
+version = "*"
+
+[package.dependencies.phonenumbers]
+optional = true
+version = ">=7.0.9,<8.99"
+
+[package.dependencies.twilio]
+optional = true
+version = ">=6.0"
+
 [package.extras]
 Call = ["twilio (>=6.0)"]
 SMS = ["twilio (>=6.0)"]
@@ -526,7 +538,6 @@ phonenumberslite = ["phonenumberslite (>=7.0.9,<8.99)"]
 reference = "fceecb23a60cfd23398cf58f29148be644853697"
 type = "git"
 url = "https://github.com/Natureshadow/django-two-factor-auth"
-
 [[package]]
 category = "main"
 description = "Integrate django with yarnpkg"
@@ -1108,6 +1119,21 @@ version = ">=0.12"
 [package.extras]
 testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"]
 
+[[package]]
+category = "dev"
+description = "Pytest plugin for measuring coverage."
+name = "pytest-cov"
+optional = false
+python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
+version = "2.8.1"
+
+[package.dependencies]
+coverage = ">=4.4"
+pytest = ">=3.6"
+
+[package.extras]
+testing = ["fields", "hunter", "process-tests (2.0.2)", "six", "virtualenv"]
+
 [[package]]
 category = "dev"
 description = "A Django plugin for pytest."
@@ -1620,7 +1646,7 @@ testing = ["pathlib2", "contextlib2", "unittest2"]
 ldap = ["django-auth-ldap"]
 
 [metadata]
-content-hash = "be171a75e940a08dd4c63d1d7be5615b9cb23d844f6fe7b3e74a63d2871ae761"
+content-hash = "70d7b7415d6d3d0f243cd72a5ed37e416d554f2a80ed498cc5ce8b4c5b36ffd7"
 python-versions = "^3.7"
 
 [metadata.files]
@@ -2159,6 +2185,10 @@ pytest = [
     {file = "pytest-5.3.1-py3-none-any.whl", hash = "sha256:63344a2e3bce2e4d522fd62b4fdebb647c019f1f9e4ca075debbd13219db4418"},
     {file = "pytest-5.3.1.tar.gz", hash = "sha256:f67403f33b2b1d25a6756184077394167fe5e2f9d8bdaab30707d19ccec35427"},
 ]
+pytest-cov = [
+    {file = "pytest-cov-2.8.1.tar.gz", hash = "sha256:cc6742d8bac45070217169f5f72ceee1e0e55b0221f54bcf24845972d3a47f2b"},
+    {file = "pytest_cov-2.8.1-py2.py3-none-any.whl", hash = "sha256:cdbdef4f870408ebdbfeb44e63e07eb18bb4619fae852f6e760645fa36172626"},
+]
 pytest-django = [
     {file = "pytest-django-3.7.0.tar.gz", hash = "sha256:17592f06d51c2ef4b7a0fb24aa32c8b6998506a03c8439606cb96db160106659"},
     {file = "pytest_django-3.7.0-py2.py3-none-any.whl", hash = "sha256:ef3d15b35ed7e46293475e6f282e71a53bcd8c6f87bdc5d5e7ad0f4d49352127"},
diff --git a/pyproject.toml b/pyproject.toml
index acbf2764d..3fc69dd48 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -66,7 +66,6 @@ pytest-django = "^3.7"
 pytest-django-testing-postgresql = "^0.1"
 selenium = "^3.141.0"
 safety = "^1.8.5"
-coverage = "^4.5.4"
 flake8 = "^3.7.9"
 flake8-django = "^0.0.4"
 flake8-fixme = "^1.1.1"
@@ -79,6 +78,7 @@ black = "^19.10b0"
 flake8-black = "^0.1.1"
 isort = "^4.3.21"
 flake8-isort = "^2.8.0"
+pytest-cov = "^2.8.1"
 
 [tool.black]
 line-length = 100
diff --git a/tox.ini b/tox.ini
index 1ac69650b..41aaf9ec5 100644
--- a/tox.ini
+++ b/tox.ini
@@ -12,8 +12,7 @@ commands =
     poetry run python manage.py compilemessages
     poetry run python manage.py yarn install
     poetry run python manage.py collectstatic --no-input --clear
-    poetry run coverage run -a -m pytest {posargs} biscuit/core/
-    poetry run coverage report --include='*/biscuit/core/*'
+    poetry run pytest --cov=biscuit {posargs} biscuit/core/
 passenv =
     TEST_SCREENSHOT_PATH
     TEST_SELENIUM_HUB
-- 
GitLab