Merge pull request #789 from yunstanford/coverage-report

Coverage report
This commit is contained in:
Eli Uriegas 2017-06-11 23:38:04 -07:00 committed by GitHub
commit 950b5ee529
2 changed files with 3 additions and 5 deletions

View File

@ -11,7 +11,7 @@ import pytest
def gunicorn_worker(): def gunicorn_worker():
command = 'gunicorn --bind 127.0.0.1:1337 --worker-class sanic.worker.GunicornWorker examples.simple_server:app' command = 'gunicorn --bind 127.0.0.1:1337 --worker-class sanic.worker.GunicornWorker examples.simple_server:app'
worker = subprocess.Popen(shlex.split(command)) worker = subprocess.Popen(shlex.split(command))
time.sleep(1) time.sleep(3)
yield yield
worker.kill() worker.kill()

View File

@ -9,16 +9,14 @@ setenv =
deps = deps =
coverage coverage
pytest pytest
pytest-cov
pytest-sugar pytest-sugar
aiohttp==1.3.5 aiohttp==1.3.5
chardet<=2.3.0 chardet<=2.3.0
beautifulsoup4 beautifulsoup4
gunicorn gunicorn
commands = commands =
pytest tests {posargs} pytest tests --cov sanic --cov-report term-missing {posargs}
coverage erase
coverage run -m sanic.app
coverage report
[testenv:flake8] [testenv:flake8]
deps = deps =