mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-13 01:30:31 +08:00
62 lines
1.5 KiB
INI
62 lines
1.5 KiB
INI
[tox]
|
|
envlist = flake8, pylint, mypy, vulture, pytest, eslint, htmlhint
|
|
skipsdist = true
|
|
|
|
[testenv]
|
|
basepython = python3.8
|
|
sitepackages = true
|
|
changedir = /src
|
|
|
|
[testenv:flake8]
|
|
whitelist_externals = bash
|
|
commands = bash -c 'flake8 --config=testenv/linters/flake8.ini kvmd testenv/tests *.py'
|
|
deps =
|
|
flake8
|
|
flake8-quotes
|
|
-rrequirements.txt
|
|
|
|
[testenv:pylint]
|
|
whitelist_externals = bash
|
|
commands = bash -c 'pylint --rcfile=testenv/linters/pylint.ini --output-format=colorized --reports=no kvmd testenv/tests *.py'
|
|
deps =
|
|
pylint
|
|
pytest
|
|
pytest-asyncio
|
|
aiohttp-basicauth
|
|
-rrequirements.txt
|
|
|
|
[testenv:mypy]
|
|
whitelist_externals = bash
|
|
commands = bash -c 'mypy --config-file=testenv/linters/mypy.ini --cache-dir=testenv/.mypy_cache kvmd testenv/tests *.py'
|
|
deps =
|
|
mypy
|
|
-rrequirements.txt
|
|
|
|
[testenv:vulture]
|
|
whitelist_externals = bash
|
|
commands = bash -c 'vulture --ignore-names=_format_P,Plugin --ignore-decorators=@exposed_http,@exposed_ws,@pytest.fixture kvmd testenv/tests *.py 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 --cache-location=/tmp --config=testenv/linters/eslintrc.yaml --color --ext .js web/share/js
|
|
|
|
[testenv:htmlhint]
|
|
whitelist_externals = htmlhint
|
|
commands = htmlhint web/*.html web/*/*.html
|