pyjwt
pyjwt copied to clipboard
tests(py39): TestPyJWKClient test suddenly failing on `master`
See title; while working on #660, I saw that TestPyJWKClient started failing on py39 (see specific test below).
Expected Result
All test pass on master.
Actual Result
TestPyJWKClient.test_get_jwt_set_sslcontext_no_ca is failing (not throwing an error).
Reproduction Steps
Run tox -e py39-crypto -- tests/test_jwks_client.py::TestPyJWKClient::test_get_jwt_set_sslcontext_no_ca
System Information
Note: likely not relevant as this is related to tests on py39
$ python -m jwt.help
{
"cryptography": {
"version": "43.0.1"
},
"implementation": {
"name": "CPython",
"version": "3.11.4"
},
"platform": {
"release": "24.3.0",
"system": "Darwin"
},
"pyjwt": {
"version": "2.10.1"
}
}
This command is only available on PyJWT v1.6.3 and greater. Otherwise, please provide some basic information about your system.
can you share some traceback?
(I just ran tox locally, with no arguments)
python 3.11.4 (used to trigger tox)
tox 4.18.1
py39-crypto: install_package> python -I -m pip install --force-reinstall --no-deps /Users/pachewise/repos/pyjwt/.tox/.tmp/package/68/pyjwt-2.10.1.tar.gz
py39-crypto: commands[0]> .tox/py39-crypto/bin/python -b -m coverage run -m pytest
=============================================================================================== test session starts ================================================================================================
platform darwin -- Python 3.9.6, pytest-6.2.5, py-1.11.0, pluggy-1.5.0
cachedir: .tox/py39-crypto/.pytest_cache
rootdir: /Users/pachewise/repos/pyjwt, configfile: tox.ini, testpaths: tests
collected 303 items
tests/test_advisory.py . [ 0%]
tests/test_algorithms.py ..................................................................................... [ 28%]
tests/test_api_jwk.py ............ss.......s [ 35%]
tests/test_api_jws.py .......................................s.................................... [ 60%]
tests/test_api_jwt.py .............................................................................. [ 86%]
tests/test_compressed_jwt.py . [ 86%]
tests/test_exceptions.py . [ 87%]
tests/test_jwks_client.py ...................F [ 93%]
tests/test_jwt.py . [ 94%]
tests/test_utils.py .................. [100%]
===================================================================================================== FAILURES =====================================================================================================
________________________________________________________________________________ TestPyJWKClient.test_get_jwt_set_sslcontext_no_ca _________________________________________________________________________________
self = <tests.test_jwks_client.TestPyJWKClient object at 0x104168220>
def test_get_jwt_set_sslcontext_no_ca(self):
url = "https://dev-87evx9ru.auth0.com/.well-known/jwks.json"
jwks_client = PyJWKClient(
url, ssl_context=ssl.SSLContext(protocol=ssl.PROTOCOL_TLS_CLIENT)
)
with pytest.raises(PyJWKClientError):
> jwks_client.get_jwk_set()
E Failed: DID NOT RAISE <class 'jwt.exceptions.PyJWKClientError'>
tests/test_jwks_client.py:355: Failed
================================================================================================= warnings summary =================================================================================================
jwt/api_jwt.py:305
/Users/pachewise/repos/pyjwt/jwt/api_jwt.py:305: DeprecationWarning: invalid escape sequence \*
"""Verify the ``jwt`` token signature and return the token claims.
-- Docs: https://docs.pytest.org/en/stable/warnings.html
============================================================================================= short test summary info ==============================================================================================
SKIPPED [1] tests/test_api_jwk.py:214: Requires cryptography library not installed
SKIPPED [1] tests/test_api_jwk.py:220: Requires cryptography library not installed
SKIPPED [1] tests/test_api_jwk.py:338: Requires cryptography library not installed
SKIPPED [1] tests/test_api_jws.py:472: Requires cryptography library not installed
FAILED tests/test_jwks_client.py::TestPyJWKClient::test_get_jwt_set_sslcontext_no_ca - Failed: DID NOT RAISE <class 'jwt.exceptions.PyJWKClientError'>
=============================================================================== 1 failed, 298 passed, 4 skipped, 1 warning in 6.17s ================================================================================
py39-crypto: exit 1 (6.41 seconds) /Users/pachewise/repos/pyjwt> .tox/py39-crypto/bin/python -b -m coverage run -m pytest pid=66606
py39-crypto: FAIL ✖ in 8.53 seconds
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
contributions are wellcome