Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
Clean up and add coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
sallner committed Jan 3, 2020
1 parent 9965d3b commit c2beb3d
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ source = gocept.webtoken

[report]
precision = 2
fail_under = 100
omit = */interfaces.py
*/test_*.py

[html]
directory = coverage-report
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
syntax: glob

*.egg-info
*.pyc
.cache
Expand Down
16 changes: 11 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
language: python
dist: xenial
python:
- 2.7
- 3.6
install: pip install tox-travis
- 2.7
- 3.6
- 3.7
- 3.8
- pypy
- pypy3
install: pip install tox-travis coveralls
script: tox
after_success:
after_success:
- coverage combine
- coveralls
cache:
pip: true
notifications:
webhooks:
secure: aAps+Rwb/FqK2syJQmGEGtE8q/hB+NncqqIjLyFsgCbPFXQOD4tDZUd4qcYIn9NSE/GVb4GUgg0AMwMs8kYciDxb8Xi2MU3OIUp62XLf5e4yPneHoQiAa7z3vYuP0bY7K+8RITtsGD9cTFToB8u+2zz60z8bZulw5n8sJUTdy62ryLEvZcUAUlgqzmC6RO1PeVZaUfOX7XBiXANDJt+/v2yH7eDzAJ1FLTJwm7ezvgpIDHIteFn3B4vPogtOg1Jcf95Rq4LKrGDVbVyzvPOEktV+dVpowGXh+yvlzf0Llue1+qaW4CXPLzr/p7+erpiq7hA2xBQw7jRyh1N30WPZd+6OeL1Ewt+5koeM/kRjMQVYAlrtSqWvVpCXXmzR4ViPhqF0QBHCPrm66HyNS1xq5kHpXWDCkXjRURY8+dEJJy7uOdIX8kHhYk1c4AtPFm7zrS45UxLLCaxDRLe4Cv+1VLax0La8ztWXhpDz80BkqefsH/xyYsD8Hg3cfSmsErI+haYGUk5Mil3macwVI+5MTqBWKNgrGnE+F4VFGq/ogRHFVForB+P2U3QmcveywnOVKo+oQYZHuHb9tSmatzDZBVTBKXZHW0O8ENGKv4q2RNLb9iCL43yow8C4G6RqhbFw/TXaMICXRNM1nFrbRFIOVuk0wcBRmggaolZ0NY48Pww=
secure: aAps+Rwb/FqK2syJQmGEGtE8q/hB+NncqqIjLyFsgCbPFXQOD4tDZUd4qcYIn9NSE/GVb4GUgg0AMwMs8kYciDxb8Xi2MU3OIUp62XLf5e4yPneHoQiAa7z3vYuP0bY7K+8RITtsGD9cTFToB8u+2zz60z8bZulw5n8sJUTdy62ryLEvZcUAUlgqzmC6RO1PeVZaUfOX7XBiXANDJt+/v2yH7eDzAJ1FLTJwm7ezvgpIDHIteFn3B4vPogtOg1Jcf95Rq4LKrGDVbVyzvPOEktV+dVpowGXh+yvlzf0Llue1+qaW4CXPLzr/p7+erpiq7hA2xBQw7jRyh1N30WPZd+6OeL1Ewt+5koeM/kRjMQVYAlrtSqWvVpCXXmzR4ViPhqF0QBHCPrm66HyNS1xq5kHpXWDCkXjRURY8+dEJJy7uOdIX8kHhYk1c4AtPFm7zrS45UxLLCaxDRLe4Cv+1VLax0La8ztWXhpDz80BkqefsH/xyYsD8Hg3cfSmsErI+haYGUk5Mil3macwVI+5MTqBWKNgrGnE+F4VFGq/ogRHFVForB+P2U3QmcveywnOVKo+oQYZHuHb9tSmatzDZBVTBKXZHW0O8ENGKv4q2RNLb9iCL43yow8C4G6RqhbFw/TXaMICXRNM1nFrbRFIOVuk0wcBRmggaolZ0NY48Pww=
5 changes: 3 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ gocept.webtoken
3.1 (unreleased)
----------------

- Nothing changed yet.

- Migrate to Github.

- Test with Python 3.8 and PyPy3.

- Stop testing with Python 3.5.

3.0 (2018-11-14)
----------------
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: Implementation
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
"""[:-1].split('\n'),
description=__doc__.strip(),
long_description='\n\n'.join(open(name).read() for name in (
Expand Down
4 changes: 2 additions & 2 deletions src/gocept/webtoken/tests/test_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ def __getitem__(self, key):
return self.data[key]

def __iter__(self):
return iter(self.data)
return iter(self.data) # pragma: no cover only needed for instance

def __len__(self):
return len(self.data)
return len(self.data) # pragma: no cover only needed for instance

headers = MyHeaders({'Authorization': 'Bearer <TOKEN>'})
assert b'<TOKEN>' == extract_token(headers)
17 changes: 10 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@ envlist =
py35,
py36,
py37,
py38,
pypy,
pypy3,
minversion = 2.0

[testenv]
deps = .
flake8
pytest
pytest-cov
pytest-flake8
pytest-sugar
deps =
flake8
py27: pytest < 5.0
pypy: pytest < 5.0
pytest-cov
pytest-flake8
pytest-sugar
passenv = LDFLAGS CFLAGS
commands = py.test --cov=src --cov-report=html --cov-report=xml --cov-report=term --junitxml=testreport.xml {posargs}
commands = py.test --cov=src {posargs}
usedevelop = True

0 comments on commit c2beb3d

Please sign in to comment.