/
niceSOFT
/
python3-pyOpenSSL
Обзор
Документация
Войти
/
niceSOFT
/
python3-pyOpenSSL
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
25.1.0
tests/conftest.py
29 строк
635 B
Alex Gaynor
Get far enough that conftest.py type checks (#1398)
08 янв 2025, 01:12
Не верифицирован
08 янв 2025, 01:12
1fdced6
Код
Авторство
О чём код?
# Copyright (c) The pyOpenSSL developers # See LICENSE for details. import pathlib from tempfile import mktemp import pytest 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")