Merge pull request #445 from hynek/header
Print library versions the proper way
diff --git a/tests/conftest.py b/tests/conftest.py
new file mode 100644
index 0000000..5a9954f
--- /dev/null
+++ b/tests/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 @@
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]