summaryrefslogtreecommitdiff
path: root/testenv/tox.ini
diff options
context:
space:
mode:
Diffstat (limited to 'testenv/tox.ini')
-rw-r--r--testenv/tox.ini32
1 files changed, 17 insertions, 15 deletions
diff --git a/testenv/tox.ini b/testenv/tox.ini
index 918a086e..937ca213 100644
--- a/testenv/tox.ini
+++ b/testenv/tox.ini
@@ -1,48 +1,50 @@
[tox]
-envlist = flake8, pylint, mypy, vulture, eslint, htmlhint
+envlist = flake8, pylint, mypy, vulture, pytest, eslint, htmlhint
skipsdist = True
[testenv]
basepython = python3.7
-changedir = /kvmd
+changedir = /src
[testenv:flake8]
-commands = flake8 --config=testenv/tox.ini kvmd genmap.py
+commands = flake8 --config=testenv/linters/flake8.ini kvmd genmap.py tests
deps =
flake8
flake8-double-quotes
-rrequirements.txt
[testenv:pylint]
-commands = pylint --rcfile=testenv/pylintrc --output-format=colorized --reports=no kvmd genmap.py
+commands = pylint --rcfile=testenv/linters/pylint.ini --output-format=colorized --reports=no kvmd genmap.py tests
deps =
pylint
+ pytest
+ pytest-asyncio
-rrequirements.txt
[testenv:mypy]
-commands = mypy --config-file=testenv/mypy.ini --cache-dir=testenv/.mypy_cache kvmd genmap.py
+commands = mypy --config-file=testenv/linters/mypy.ini --cache-dir=testenv/.mypy_cache kvmd genmap.py tests
deps =
mypy
-rrequirements.txt
[testenv:vulture]
-commands = vulture --ignore-names=_format_P --ignore-decorators=@_exposed,@_system_task kvmd genmap.py testenv/vulture-wl.py
+commands = vulture --ignore-names=_format_P --ignore-decorators=@_exposed,@_system_task kvmd genmap.py tests testenv/linters/vulture-wl.py
deps =
vulture
-rrequirements.txt
+[testenv:pytest]
+commands = py.test -vv --cov-config=testenv/linters/coverage.ini --cov-report=term-missing --cov=kvmd tests
+deps =
+ pytest
+ pytest-cov
+ pytest-asyncio
+ -rrequirements.txt
+
[testenv:eslint]
whitelist_externals = eslint
-commands = eslint --config=testenv/eslintrc.yaml --color --ext .js web/share/js
+commands = eslint --config=testenv/linters/eslintrc.yaml --color --ext .js web/share/js
[testenv:htmlhint]
whitelist_externals = htmlhint
commands = htmlhint web/*.html web/*/*.html
-
-[flake8]
-max-line-length = 160
-# W503 line break before binary operator
-# E227 missing whitespace around bitwise or shift operator
-# E241 multiple spaces after
-# E252 missing whitespace around parameter equals
-ignore=W503,E227,E241,E252