]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
add mypy coverage task
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 9 Apr 2022 15:15:29 +0000 (11:15 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 9 Apr 2022 15:15:29 +0000 (11:15 -0400)
get mypy plugin to be able to have coverage

Change-Id: I8c2d57bb97bd522b83d20a0f97576c7ae9ea71a5

tox.ini

diff --git a/tox.ini b/tox.ini
index 444e3fb35d783be1450abc1b5b132ed2df03ad15..df7787db0450cf0be7b5ca5b19fbe902f8e29854 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -148,9 +148,22 @@ deps=
      importlib_metadata; python_version < '3.8'
      mypy
      patch==1.*
+
 commands =
     pytest -m mypy {posargs}
 
+[testenv:mypy-cov]
+
+deps=
+     {[testenv:mypy]deps}
+     pytest-cov
+
+commands =
+    pytest -m mypy {env:COVERAGE} {posargs}
+
+setenv=
+    COVERAGE={[testenv]cov_args}
+
 # thanks to https://julien.danjou.info/the-best-flake8-extensions/
 [testenv:lint]
 basepython = python3