add tox for test and coverage automation. Add development requirements.txt
This commit is contained in:
parent
993d81090c
commit
65d9b15e0c
7
.coveragerc
Normal file
7
.coveragerc
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[run]
|
||||||
|
branch = True
|
||||||
|
source = sanic, tests
|
||||||
|
omit = site-packages
|
||||||
|
|
||||||
|
[html]
|
||||||
|
directory = coverage
|
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -1,3 +1,10 @@
|
||||||
|
*~
|
||||||
|
*.egg-info
|
||||||
|
*.egg
|
||||||
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
coverage
|
||||||
|
.tox
|
||||||
settings.py
|
settings.py
|
||||||
*.pyc
|
*.pyc
|
||||||
.idea/*
|
.idea/*
|
||||||
|
|
7
requirements-dev.txt
Normal file
7
requirements-dev.txt
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
httptools
|
||||||
|
ujson
|
||||||
|
uvloop
|
||||||
|
aiohttp
|
||||||
|
pytest
|
||||||
|
coverage
|
||||||
|
tox
|
34
tox.ini
Normal file
34
tox.ini
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[tox]
|
||||||
|
|
||||||
|
envlist = py35, report
|
||||||
|
|
||||||
|
[testenv]
|
||||||
|
|
||||||
|
deps =
|
||||||
|
aiohttp
|
||||||
|
pytest
|
||||||
|
# pytest-cov
|
||||||
|
coverage
|
||||||
|
|
||||||
|
commands =
|
||||||
|
coverage run -m pytest tests {posargs}
|
||||||
|
mv .coverage .coverage.{envname}
|
||||||
|
|
||||||
|
basepython:
|
||||||
|
py35: python3.5
|
||||||
|
|
||||||
|
whitelist_externals =
|
||||||
|
coverage
|
||||||
|
mv
|
||||||
|
echo
|
||||||
|
|
||||||
|
[testenv:report]
|
||||||
|
|
||||||
|
commands =
|
||||||
|
coverage combine
|
||||||
|
coverage report
|
||||||
|
coverage html
|
||||||
|
echo "Open file://{toxinidir}/coverage/index.html"
|
||||||
|
|
||||||
|
basepython =
|
||||||
|
python3.5
|
Loading…
Reference in New Issue
Block a user