mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
58 lines
1.4 KiB
INI
58 lines
1.4 KiB
INI
[tox]
|
|
envlist = flake8, pylint, mypy, vulture, pytest, eslint, htmlhint
|
|
skipsdist = true
|
|
|
|
[testenv]
|
|
basepython = python3.7
|
|
sitepackages = true
|
|
changedir = /src
|
|
|
|
[testenv:flake8]
|
|
commands = flake8 --config=testenv/linters/flake8.ini kvmd genmap.py testenv/tests
|
|
deps =
|
|
flake8
|
|
flake8-double-quotes
|
|
-rrequirements.txt
|
|
|
|
[testenv:pylint]
|
|
commands = pylint --rcfile=testenv/linters/pylint.ini --output-format=colorized --reports=no kvmd genmap.py testenv/tests
|
|
deps =
|
|
pylint
|
|
pytest
|
|
pytest-asyncio
|
|
aiohttp-basicauth
|
|
-rrequirements.txt
|
|
|
|
[testenv:mypy]
|
|
commands = mypy --config-file=testenv/linters/mypy.ini --cache-dir=testenv/.mypy_cache kvmd genmap.py testenv/tests
|
|
deps =
|
|
mypy
|
|
-rrequirements.txt
|
|
|
|
[testenv:vulture]
|
|
commands = vulture --ignore-names=_format_P,Plugin --ignore-decorators=@_exposed,@_system_task,@pytest.fixture kvmd genmap.py testenv/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 testenv/tests
|
|
setenv =
|
|
PYTHONPATH=/src
|
|
deps =
|
|
pytest
|
|
pytest-cov
|
|
pytest-mock
|
|
pytest-asyncio
|
|
pytest-aiohttp
|
|
aiohttp-basicauth
|
|
-rrequirements.txt
|
|
|
|
[testenv:eslint]
|
|
whitelist_externals = eslint
|
|
commands = eslint --config=testenv/linters/eslintrc.yaml --color --ext .js web/share/js
|
|
|
|
[testenv:htmlhint]
|
|
whitelist_externals = htmlhint
|
|
commands = htmlhint web/*.html web/*/*.html
|