diff --git a/.travis.yml b/.travis.yml index f4a32a765b..60dc696e02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,10 +42,12 @@ matrix: install: - pip install tox + - pip install codecov - sh scripts/download-semaphore.sh script: - sh scripts/runtox.sh + - codecov notifications: webhooks: diff --git a/test-requirements.txt b/test-requirements.txt index 1e55df6f11..4f886522df 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,3 +5,4 @@ six==1.11.0 tox==3.2.1 Werkzeug==0.14.1 pytest-localserver==0.4.1 +pytest-cov==2.6.0 diff --git a/tests/test_client.py b/tests/test_client.py index d09b9aaf4f..6322a5bf80 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -93,7 +93,10 @@ def send_event(self, event): start = time.time() output = subprocess.check_output([sys.executable, str(app)]) end = time.time() - assert int(end - start) == num_messages / 10 + + # Each message takes at least 0.1 seconds to process + assert int(end - start) >= num_messages / 10 + assert output.count(b"HI") == num_messages diff --git a/tox.ini b/tox.ini index 7d222d24ef..d5ab231a8f 100644 --- a/tox.ini +++ b/tox.ini @@ -70,7 +70,7 @@ basepython = pypy: pypy commands = - py.test {env:TESTPATH} {posargs} + py.test {env:TESTPATH} --cov=sentry_sdk {posargs} [testenv:linters] commands =