summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHynek Schlawack <hs@ox.cx>2017-02-18 08:25:34 +0100
committerGitHub <noreply@github.com>2017-02-18 08:25:34 +0100
commit3bcf315b20fe03680b5243e3f880010168426745 (patch)
tree65e8c7223710ec4966f8c840d9d3b4b127bc8e69
parent868dc3c25404d3be232c209ec15f976e434668d5 (diff)
downloadpyopenssl-3bcf315b20fe03680b5243e3f880010168426745.tar.gz
Fix up some pytest-related stuff (#601)
-rw-r--r--CONTRIBUTING.rst2
-rw-r--r--tests/test_crypto.py4
-rw-r--r--tests/test_ssl.py8
3 files changed, 5 insertions, 9 deletions
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 8539f61..ad10137 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -28,7 +28,6 @@ Code
Create different pull requests for unrelated features or bugfixes.
- Code should follow `PEP 8`_, especially in the "do what code around you does" sense.
Follow OpenSSL naming for callables whenever possible is preferred.
-- New tests should use `pytest-style assertions`_ instead of the old ``self.assertXYZ``-style.
- Pull requests that introduce code must test all new behavior they introduce as well as for previously untested or poorly tested behavior that they touch.
- Pull requests are not allowed to break existing tests.
We usually don't comment on pull requests that are breaking the CI because we consider them work in progress.
@@ -111,7 +110,6 @@ Feel free to cross-check this information with Keybase_.
.. _Keybase: https://keybase.io/hynek
.. _pyca/pyopenssl: https://github.com/pyca/pyopenssl
.. _PEP 8: https://www.python.org/dev/peps/pep-0008/
-.. _pytest-style assertions: http://docs.pytest.org/en/latest/assert.html
.. _cryptography code review process: https://cryptography.io/en/latest/development/reviewing-patches/
.. _freenode: https://freenode.net
.. _mailing list: https://mail.python.org/mailman/listinfo/cryptography-dev
diff --git a/tests/test_crypto.py b/tests/test_crypto.py
index ad79f6a..878479f 100644
--- a/tests/test_crypto.py
+++ b/tests/test_crypto.py
@@ -743,9 +743,7 @@ class TestX509Ext(object):
class TestPKey(object):
"""
- py.test-based tests for :class:`OpenSSL.crypto.PKey`.
-
- If possible, add new tests here.
+ Tests for `OpenSSL.crypto.PKey`.
"""
def test_convert_from_cryptography_private_key(self):
diff --git a/tests/test_ssl.py b/tests/test_ssl.py
index 44a042b..adefb1d 100644
--- a/tests/test_ssl.py
+++ b/tests/test_ssl.py
@@ -2041,8 +2041,8 @@ class TestConnection(object):
def test_peek(self):
"""
- `Connection.recv` peeks into the connection if `socket.MSG_PEEK`
- is passed.
+ `Connection.recv` peeks into the connection if `socket.MSG_PEEK` is
+ passed.
"""
server, client = loopback()
server.send(b'xy')
@@ -2052,8 +2052,8 @@ class TestConnection(object):
def test_connect_wrong_args(self):
"""
- `Connection.connect` raises `TypeError` if called with
- a non-address argument.
+ `Connection.connect` raises `TypeError` if called with a non-address
+ argument.
"""
connection = Connection(Context(TLSv1_METHOD), socket())
with pytest.raises(TypeError):