From c479ade3017bcac34e2585b284d2c4b05d28d657 Mon Sep 17 00:00:00 2001 From: Jacob Schaer Date: Tue, 4 Jul 2023 14:40:27 -0700 Subject: [PATCH] Release 1.0.9 (#31) * Formatting * Update setup.py fix RST on pypi --- setup.py | 3 ++- tests/test_client.py | 14 +++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 44b0628..0314658 100644 --- a/setup.py +++ b/setup.py @@ -7,9 +7,10 @@ setuptools.setup( name="doipclient", - version="1.0.8", + version="1.0.9", description="A Diagnostic over IP (DoIP) client implementing ISO-13400-2.", long_description=long_description, + long_description_content_type='text/x-rst', author="Jacob Schaer", url="https://github.com/jacobschaer/python-doipclient", packages=setuptools.find_packages(), diff --git a/tests/test_client.py b/tests/test_client.py index 0cbe6d6..6751555 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -644,10 +644,10 @@ def test_await_ipv4(mock_socket): def test_exception_from_blocking_ssl_socket(mock_socket, mocker): - """SSL sockets behave slightly different than regular sockets in - non-blocking mode. They won't raise BlockingIOError but SSLWantWriteError + """SSL sockets behave slightly different than regular sockets in + non-blocking mode. They won't raise BlockingIOError but SSLWantWriteError or SSLWantReadError instead. - + See: https://docs.python.org/3/library/ssl.html#notes-on-non-blocking-sockets """ sut = DoIPClient(test_ip, test_logical_address) @@ -664,7 +664,9 @@ def test_exception_from_blocking_ssl_socket(mock_socket, mocker): def test_use_secure_uses_default_ssl_context(mock_socket, mocker): """Wrap socket with default SSL-context when use_secure=True""" mocked_context = mocker.patch.object(ssl, "SSLContext", autospec=True) - sut = DoIPClient(test_ip, test_logical_address, use_secure=True, activation_type=None) + sut = DoIPClient( + test_ip, test_logical_address, use_secure=True, activation_type=None + ) mocked_wrap_socket = mocked_context.return_value.wrap_socket mocked_wrap_socket.assert_called_once_with(mock_socket) @@ -672,5 +674,7 @@ def test_use_secure_uses_default_ssl_context(mock_socket, mocker): def test_use_secure_with_external_ssl_context(mock_socket, mocker): """Wrap socket with user provided SSL-context when use_secure=ssl_context""" mocked_context = mocker.patch.object(ssl, "SSLContext", autospec=True) - sut = DoIPClient(test_ip, test_logical_address, use_secure=mocked_context, activation_type=None) + sut = DoIPClient( + test_ip, test_logical_address, use_secure=mocked_context, activation_type=None + ) mocked_context.wrap_socket.assert_called_once_with(mock_socket)