{"name": "test_jwt_decode_missing_sub_raises", "status": "broken", "statusDetails": {"message": "TypeError: Expected a BaseException type, but got 'Errors'", "trace": "self = , jwt_service = \n\n def test_jwt_decode_missing_sub_raises(self, jwt_service):\n token = jwt.encode(\n {\"exp\": datetime.now(timezone.utc) + timedelta(minutes=5)},\n ENV.SECRET_STRING,\n ENV.ALGORITHM,\n )\n> with pytest.raises(errors, match=\"JWT payload is None\"):\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\njwt_service = \nself = \ntoken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3ODgwOTc1MzN9.SKtl0MVS-YleojtT7kGcZA_CkpRVLb4Wk8d8J6yA8fo'\n\nsrc/tests/test_unit.py:44: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n.venv/lib/python3.14/site-packages/_pytest/raises.py:624: in __init__\n self.expected_exceptions = tuple(\n ^^^^^\n __class__ = \n check = None\n expected_exception = \n expected_exceptions = (,)\n match = 'JWT payload is None'\n self = <[AttributeError(\"'RaisesExc' object has no attribute 'expected_exceptions'\") raised in repr()] RaisesExc object at 0x10b6e5be0>\n.venv/lib/python3.14/site-packages/_pytest/raises.py:625: in \n self._parse_exc(e, expected=\"a BaseException type\")\n .0 = \n e = \n self = <[AttributeError(\"'RaisesExc' object has no attribute 'expected_exceptions'\") raised in repr()] RaisesExc object at 0x10b6e5be0>\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <[AttributeError(\"'RaisesExc' object has no attribute 'expected_exceptions'\") raised in repr()] RaisesExc object at 0x10b6e5be0>\nexc = , expected = 'a BaseException type'\n\n def _parse_exc(\n self, exc: type[BaseExcT_1] | types.GenericAlias, expected: str\n ) -> type[BaseExcT_1]:\n if isinstance(exc, type) and issubclass(exc, BaseException):\n if not issubclass(exc, Exception):\n self.is_baseexception = True\n return exc\n # because RaisesGroup does not support variable number of exceptions there's\n # still a use for RaisesExc(ExceptionGroup[Exception]).\n origin_exc: type[BaseException] | None = get_origin(exc)\n if origin_exc and issubclass(origin_exc, BaseExceptionGroup):\n exc_type = get_args(exc)[0]\n if (\n issubclass(origin_exc, ExceptionGroup) and exc_type in (Exception, Any)\n ) or (\n issubclass(origin_exc, BaseExceptionGroup)\n and exc_type in (BaseException, Any)\n ):\n if not issubclass(origin_exc, ExceptionGroup):\n self.is_baseexception = True\n return cast(type[BaseExcT_1], origin_exc)\n else:\n raise ValueError(\n f\"Only `ExceptionGroup[Exception]` or `BaseExceptionGroup[BaseException]` \"\n f\"are accepted as generic types but got `{exc}`. \"\n f\"As `raises` will catch all instances of the specified group regardless of the \"\n f\"generic argument specific nested exceptions has to be checked \"\n f\"with `RaisesGroup`.\"\n )\n # unclear if the Type/ValueError distinction is even helpful here\n msg = f\"Expected {expected}, but got \"\n if isinstance(exc, type): # type: ignore[unreachable]\n raise ValueError(msg + f\"{exc.__name__!r}\")\n if isinstance(exc, BaseException): # type: ignore[unreachable]\n raise TypeError(msg + f\"an exception instance: {type(exc).__name__}\")\n> raise TypeError(msg + repr(type(exc).__name__))\nE TypeError: Expected a BaseException type, but got 'Errors'\n\nexc = \nexpected = 'a BaseException type'\nmsg = 'Expected a BaseException type, but got '\norigin_exc = None\nself = <[AttributeError(\"'RaisesExc' object has no attribute 'expected_exceptions'\") raised in repr()] RaisesExc object at 0x10b6e5be0>\n\n.venv/lib/python3.14/site-packages/_pytest/raises.py:454: TypeError"}, "start": 1788097233090, "stop": 1788097233090, "uuid": "5a0110d7-04ef-4003-9b16-021bc4a657d8", "historyId": "91a345521e32c7d203bed30df1095e22", "testCaseId": "91a345521e32c7d203bed30df1095e22", "fullName": "src.tests.test_unit.TestJWT#test_jwt_decode_missing_sub_raises", "labels": [{"name": "parentSuite", "value": "src.tests"}, {"name": "suite", "value": "test_unit"}, {"name": "subSuite", "value": "TestJWT"}, {"name": "host", "value": "MacBook-Pro-mario.local"}, {"name": "thread", "value": "12798-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "src.tests.test_unit"}], "titlePath": ["src", "tests", "test_unit.py", "TestJWT"]}