aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/pyOpenSSL/py3/tests/conftest.py
diff options
context:
space:
mode:
authormaxim-yurchuk <maxim-yurchuk@yandex-team.com>2024-10-09 12:29:46 +0300
committermaxim-yurchuk <maxim-yurchuk@yandex-team.com>2024-10-09 13:14:22 +0300
commit9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80 (patch)
treea8fb3181d5947c0d78cf402aa56e686130179049 /contrib/python/pyOpenSSL/py3/tests/conftest.py
parenta44b779cd359f06c3ebbef4ec98c6b38609d9d85 (diff)
downloadydb-9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80.tar.gz
publishFullContrib: true for ydb
<HIDDEN_URL> commit_hash:c82a80ac4594723cebf2c7387dec9c60217f603e
Diffstat (limited to 'contrib/python/pyOpenSSL/py3/tests/conftest.py')
-rw-r--r--contrib/python/pyOpenSSL/py3/tests/conftest.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/contrib/python/pyOpenSSL/py3/tests/conftest.py b/contrib/python/pyOpenSSL/py3/tests/conftest.py
new file mode 100644
index 0000000000..5bae6b8f71
--- /dev/null
+++ b/contrib/python/pyOpenSSL/py3/tests/conftest.py
@@ -0,0 +1,26 @@
+# 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")