summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHynek Schlawack <hs@ox.cx>2016-03-14 13:51:16 +0100
committerHynek Schlawack <hs@ox.cx>2016-03-14 13:52:18 +0100
commitf9182e2c2e37cce45604cf8a30c1678b9397b746 (patch)
tree65fa9049dcbccd2a6a517b2821f64e914aef577a
parent89454678108d72b8dbcf52d8df48d3f596719000 (diff)
downloadpyopenssl-f9182e2c2e37cce45604cf8a30c1678b9397b746.tar.gz
Print library versions the proper way
-rw-r--r--MANIFEST.in2
-rw-r--r--conftest.py12
-rw-r--r--tox.ini2
3 files changed, 13 insertions, 3 deletions
diff --git a/MANIFEST.in b/MANIFEST.in
index 50cdc78..f63d8a6 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,4 +1,4 @@
-include LICENSE MANIFEST.in *.rst tox.ini docs-requirements.txt .coveragerc
+include LICENSE MANIFEST.in *.rst tox.ini docs-requirements.txt .coveragerc conftest.py
exclude leakcheck
recursive-include tests *.py
recursive-include doc *
diff --git a/conftest.py b/conftest.py
new file mode 100644
index 0000000..5a9954f
--- /dev/null
+++ b/conftest.py
@@ -0,0 +1,12 @@
+# Copyright (c) The pyOpenSSL developers
+# See LICENSE for details.
+
+
+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__
+ )
diff --git a/tox.ini b/tox.ini
index a76d1a3..c2591b8 100644
--- a/tox.ini
+++ b/tox.ini
@@ -17,8 +17,6 @@ setenv =
PIP_NO_BINARY=cryptography
commands =
openssl version
- python -c "import OpenSSL.SSL; print(OpenSSL.SSL.SSLeay_version(OpenSSL.SSL.SSLEAY_VERSION))"
- python -c "import cryptography; print(cryptography.__version__)"
coverage run --parallel -m pytest {posargs}
[testenv:py27-twistedMaster]