mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 09:10:30 +08:00
moved tests to testenv
This commit is contained in:
parent
92260645c5
commit
bc0deaee5f
@ -11,4 +11,3 @@
|
|||||||
/*.pkg.tar.xz
|
/*.pkg.tar.xz
|
||||||
/*.egg-info
|
/*.egg-info
|
||||||
/*kvmd-*.tar.gz
|
/*kvmd-*.tar.gz
|
||||||
|
|
||||||
|
|||||||
1
Makefile
1
Makefile
@ -30,6 +30,7 @@ tox: _testenv
|
|||||||
time docker run --rm \
|
time docker run --rm \
|
||||||
--volume `pwd`:/src:ro \
|
--volume `pwd`:/src:ro \
|
||||||
--volume `pwd`/testenv:/src/testenv:rw \
|
--volume `pwd`/testenv:/src/testenv:rw \
|
||||||
|
--volume `pwd`/testenv/tests:/src/testenv/tests:ro \
|
||||||
--volume `pwd`/extras:/usr/share/kvmd/extras:ro \
|
--volume `pwd`/extras:/usr/share/kvmd/extras:ro \
|
||||||
--volume `pwd`/configs:/usr/share/kvmd/configs.default:ro \
|
--volume `pwd`/configs:/usr/share/kvmd/configs.default:ro \
|
||||||
-it $(TESTENV_IMAGE) bash -c " \
|
-it $(TESTENV_IMAGE) bash -c " \
|
||||||
|
|||||||
@ -8,14 +8,14 @@ sitepackages = true
|
|||||||
changedir = /src
|
changedir = /src
|
||||||
|
|
||||||
[testenv:flake8]
|
[testenv:flake8]
|
||||||
commands = flake8 --config=testenv/linters/flake8.ini kvmd genmap.py tests
|
commands = flake8 --config=testenv/linters/flake8.ini kvmd genmap.py testenv/tests
|
||||||
deps =
|
deps =
|
||||||
flake8
|
flake8
|
||||||
flake8-double-quotes
|
flake8-double-quotes
|
||||||
-rrequirements.txt
|
-rrequirements.txt
|
||||||
|
|
||||||
[testenv:pylint]
|
[testenv:pylint]
|
||||||
commands = pylint --rcfile=testenv/linters/pylint.ini --output-format=colorized --reports=no kvmd genmap.py tests
|
commands = pylint --rcfile=testenv/linters/pylint.ini --output-format=colorized --reports=no kvmd genmap.py testenv/tests
|
||||||
deps =
|
deps =
|
||||||
pylint
|
pylint
|
||||||
pytest
|
pytest
|
||||||
@ -24,19 +24,21 @@ deps =
|
|||||||
-rrequirements.txt
|
-rrequirements.txt
|
||||||
|
|
||||||
[testenv:mypy]
|
[testenv:mypy]
|
||||||
commands = mypy --config-file=testenv/linters/mypy.ini --cache-dir=testenv/.mypy_cache kvmd genmap.py tests
|
commands = mypy --config-file=testenv/linters/mypy.ini --cache-dir=testenv/.mypy_cache kvmd genmap.py testenv/tests
|
||||||
deps =
|
deps =
|
||||||
mypy
|
mypy
|
||||||
-rrequirements.txt
|
-rrequirements.txt
|
||||||
|
|
||||||
[testenv:vulture]
|
[testenv:vulture]
|
||||||
commands = vulture --ignore-names=_format_P,Plugin --ignore-decorators=@_exposed,@_system_task,@pytest.fixture kvmd genmap.py tests testenv/linters/vulture-wl.py
|
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 =
|
deps =
|
||||||
vulture
|
vulture
|
||||||
-rrequirements.txt
|
-rrequirements.txt
|
||||||
|
|
||||||
[testenv:pytest]
|
[testenv:pytest]
|
||||||
commands = py.test -vv --cov-config=testenv/linters/coverage.ini --cov-report=term-missing --cov=kvmd tests
|
commands = py.test -vv --cov-config=testenv/linters/coverage.ini --cov-report=term-missing --cov=kvmd testenv/tests
|
||||||
|
setenv =
|
||||||
|
PYTHONPATH=/src
|
||||||
deps =
|
deps =
|
||||||
pytest
|
pytest
|
||||||
pytest-cov
|
pytest-cov
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user