/
niceSOFT
/
python3-pyOpenSSL
Обзор
Документация
Войти
/
niceSOFT
/
python3-pyOpenSSL
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
26.3.0
tests/conftest.py
33 строки
749 B
Alex Gaynor
Add aws-lc compatibility to tests and CI (#1476)
12 мар 2026, 19:09
Не верифицирован
12 мар 2026, 19:09
6fefff0
Код
Авторство
О чём код?
# Copyright (c) The pyOpenSSL developers # See LICENSE for details. import pathlib from tempfile import mktemp import pytest from OpenSSL.SSL import OPENSSL_VERSION, SSLeay_version is_awslc = b"AWS-LC" in SSLeay_version(OPENSSL_VERSION) def pytest_report_header(config: pytest.Config) -> str: import cryptography import OpenSSL.SSL return ( f"OpenSSL: " f"{OpenSSL.SSL.SSLeay_version(OpenSSL.SSL.SSLEAY_VERSION)!r}\n" f"cryptography: {cryptography.__version__}" ) @pytest.fixture def tmpfile(tmp_path: pathlib.Path) -> bytes: """ Return UTF-8-encoded bytes of a path to a tmp file. The file will be cleaned up after the test run. """ return mktemp(dir=tmp_path).encode("utf-8")