From 3bcf315b20fe03680b5243e3f880010168426745 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Sat, 18 Feb 2017 08:25:34 +0100 Subject: Fix up some pytest-related stuff (#601) --- CONTRIBUTING.rst | 2 -- tests/test_crypto.py | 4 +--- tests/test_ssl.py | 8 ++++---- 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): -- cgit v1.2.1