You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
609 B

# Copyright (c) The pyOpenSSL developers
# See LICENSE for details.
from tempfile import mktemp
import pytest
def pytest_report_header(config):
import OpenSSL.SSL
import cryptography
return "OpenSSL: {openssl}\ncryptography: {cryptography}".format(
openssl=OpenSSL.SSL.SSLeay_version(OpenSSL.SSL.SSLEAY_VERSION),
cryptography=cryptography.__version__,
)
@pytest.fixture
def tmpfile(tmpdir):
"""
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=tmpdir.dirname).encode("utf-8")