Fix pytest and pinned test dependencies

This commit is contained in:
José Padilla 2018-12-06 07:32:27 -05:00
parent 3f735fdf68
commit b65e1ac6dc
6 changed files with 16 additions and 7 deletions

View File

@ -12,6 +12,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Added
[v1.7.1][1.7.1]
-------------------------------------------------------------------------
### Fixed
- Update test dependencies with pinned ranges
- Fix pytest deprecation warnings
[v1.7.0][1.7.0]
-------------------------------------------------------------------------
@ -228,6 +236,7 @@ rarely used. Users affected by this should upgrade to 3.3+.
[1.6.3]: https://github.com/jpadilla/pyjwt/compare/1.6.1...1.6.3
[1.6.4]: https://github.com/jpadilla/pyjwt/compare/1.6.3...1.6.4
[1.7.0]: https://github.com/jpadilla/pyjwt/compare/1.6.4...1.7.0
[1.7.1]: https://github.com/jpadilla/pyjwt/compare/1.7.0...1.7.1
[109]: https://github.com/jpadilla/pyjwt/pull/109
[110]: https://github.com/jpadilla/pyjwt/pull/110

View File

@ -10,7 +10,7 @@ http://self-issued.info/docs/draft-jones-json-web-token-01.html
__title__ = 'pyjwt'
__version__ = '1.7.0'
__version__ = '1.7.1'
__author__ = 'José Padilla'
__license__ = 'MIT'
__copyright__ = 'Copyright 2015-2018 José Padilla'

View File

@ -33,9 +33,9 @@ if sys.argv[-1] == 'publish':
sys.exit()
tests_require = [
'pytest==3.7.1',
'pytest-cov==2.5.1',
'pytest-runner==4.2',
'pytest>=4.0.1,<5.0.0',
'pytest-cov>=2.6.0,<3.0.0',
'pytest-runner>=4.2,<5.0.0',
]
needs_pytest = set(('pytest', 'test', 'ptr')).intersection(sys.argv)

View File

@ -294,7 +294,7 @@ class TestJWS:
jws.decode, example_jws, key=example_secret,
options={'verify_signature': False},
)
except AssertionError:
except pytest.fail.Exception:
pass
else:
assert False, "Unexpected DeprecationWarning raised."

View File

@ -516,7 +516,7 @@ class TestJWT:
pytest.deprecated_call(
jwt.decode, jwt_message, secret, verify=False,
)
except AssertionError:
except pytest.fail.Exception:
pass
else:
assert False, "Unexpected DeprecationWarning raised."

View File

@ -11,7 +11,7 @@ import pytest
(255, b'_w'),
(65537, b'AQAB'),
(123456789, b'B1vNFQ'),
pytest.mark.xfail((-1, ''), raises=ValueError)
pytest.param(-1, '', marks=pytest.mark.xfail(raises=ValueError))
])
def test_to_base64url_uint(inputval, expected):
actual = to_base64url_uint(inputval)