From 47029c0311b6085dbae094846ffe9443b2ee34b3 Mon Sep 17 00:00:00 2001 From: Jay Miller Date: Wed, 3 Jul 2024 16:28:34 -0400 Subject: [PATCH 1/2] updates async test to skip if SSL not installed Signed-off-by: Jay Miller --- tests/test_asyncio/test_connection_pool.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_asyncio/test_connection_pool.py b/tests/test_asyncio/test_connection_pool.py index 3d397492..e446f68d 100644 --- a/tests/test_asyncio/test_connection_pool.py +++ b/tests/test_asyncio/test_connection_pool.py @@ -7,6 +7,8 @@ from tests.conftest import skip_if_server_version_lt from valkey._parsers.url_parser import to_bool from valkey.asyncio.connection import Connection +from valkey.utils import SSL_AVAILABLE + from .compat import aclosing, mock from .conftest import asynccontextmanager @@ -541,7 +543,7 @@ def test_extra_querystring_options(self): assert pool.connection_class == valkey.UnixDomainSocketConnection assert pool.connection_kwargs == {"path": "/socket", "a": "1", "b": "2"} - +@pytest.mark.skipif(not SSL_AVAILABLE, reason="SSL not installed") class TestSSLConnectionURLParsing: def test_host(self): pool = valkey.ConnectionPool.from_url("valkeys://my.host") From 3a539b35571101f3ad5b90c81ef2fce32cb9b32d Mon Sep 17 00:00:00 2001 From: Salvatore Mesoraca Date: Fri, 5 Jul 2024 17:37:18 +0200 Subject: [PATCH 2/2] Fix empty lines issues for CI Signed-off-by: Salvatore Mesoraca --- tests/test_asyncio/test_connection_pool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_asyncio/test_connection_pool.py b/tests/test_asyncio/test_connection_pool.py index e446f68d..2b7813fe 100644 --- a/tests/test_asyncio/test_connection_pool.py +++ b/tests/test_asyncio/test_connection_pool.py @@ -9,7 +9,6 @@ from valkey.asyncio.connection import Connection from valkey.utils import SSL_AVAILABLE - from .compat import aclosing, mock from .conftest import asynccontextmanager from .test_pubsub import wait_for_message @@ -543,6 +542,7 @@ def test_extra_querystring_options(self): assert pool.connection_class == valkey.UnixDomainSocketConnection assert pool.connection_kwargs == {"path": "/socket", "a": "1", "b": "2"} + @pytest.mark.skipif(not SSL_AVAILABLE, reason="SSL not installed") class TestSSLConnectionURLParsing: def test_host(self):