Skip to content

Commit ff97fc1

Browse files
authored
ref: Coverage (#78)
* ref: Coverage * fix: Remove too strict assertion about test suite speed
1 parent 7d216ef commit ff97fc1

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ matrix:
4242

4343
install:
4444
- pip install tox
45+
- pip install codecov
4546
- sh scripts/download-semaphore.sh
4647

4748
script:
4849
- sh scripts/runtox.sh
50+
- codecov
4951

5052
notifications:
5153
webhooks:

test-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ six==1.11.0
55
tox==3.2.1
66
Werkzeug==0.14.1
77
pytest-localserver==0.4.1
8+
pytest-cov==2.6.0

tests/test_client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ def send_event(self, event):
9393
start = time.time()
9494
output = subprocess.check_output([sys.executable, str(app)])
9595
end = time.time()
96-
assert int(end - start) == num_messages / 10
96+
97+
# Each message takes at least 0.1 seconds to process
98+
assert int(end - start) >= num_messages / 10
99+
97100
assert output.count(b"HI") == num_messages
98101

99102

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ basepython =
7070
pypy: pypy
7171

7272
commands =
73-
py.test {env:TESTPATH} {posargs}
73+
py.test {env:TESTPATH} --cov=sentry_sdk {posargs}
7474

7575
[testenv:linters]
7676
commands =

0 commit comments

Comments
 (0)