/
niceSOFT
/
python3-pyOpenSSL
Обзор
Документация
Войти
/
niceSOFT
/
python3-pyOpenSSL
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
26.2.0
tests/test_util.py
19 строк
637 B
Alex Gaynor
Add aws-lc compatibility to tests and CI (#1476)
12 мар 2026, 19:09
Не верифицирован
12 мар 2026, 19:09
6fefff0
Код
Авторство
О чём код?
import pytest from OpenSSL._util import exception_from_error_queue, lib class TestErrors: """ Tests for handling of certain OpenSSL error cases. """ def test_exception_from_error_queue_nonexistent_reason(self) -> None: """ :func:`exception_from_error_queue` raises ``ValueError`` when it encounters an OpenSSL error code which does not have a reason string. """ lib.ERR_put_error(lib.ERR_LIB_EVP, 0, 1112, b"", 10) with pytest.raises(ValueError) as exc: exception_from_error_queue(ValueError) assert exc.value.args[0][0][2] in ("", "unknown error")