55import pytest_asyncio
66import valkey .asyncio as valkey
77from tests .conftest import VALKEY_INFO
8- from valkey ._parsers import _AsyncHiredisParser , _AsyncRESP2Parser
98from valkey .asyncio import Sentinel
109from valkey .asyncio .client import Monitor
1110from valkey .asyncio .connection import Connection , parse_url
1211from valkey .asyncio .retry import Retry
1312from valkey .backoff import NoBackoff
14- from valkey .utils import HIREDIS_AVAILABLE
1513
1614from .compat import mock
1715
@@ -26,41 +24,21 @@ async def _get_info(valkey_url):
2624@pytest_asyncio .fixture (
2725 params = [
2826 pytest .param (
29- (True , _AsyncRESP2Parser ),
27+ (True ,),
3028 marks = pytest .mark .skipif (
3129 'config.VALKEY_INFO["cluster_enabled"]' , reason = "cluster mode enabled"
3230 ),
3331 ),
34- (False , _AsyncRESP2Parser ),
35- pytest .param (
36- (True , _AsyncHiredisParser ),
37- marks = [
38- pytest .mark .skipif (
39- 'config.VALKEY_INFO["cluster_enabled"]' ,
40- reason = "cluster mode enabled" ,
41- ),
42- pytest .mark .skipif (
43- not HIREDIS_AVAILABLE , reason = "hiredis is not installed"
44- ),
45- ],
46- ),
47- pytest .param (
48- (False , _AsyncHiredisParser ),
49- marks = pytest .mark .skipif (
50- not HIREDIS_AVAILABLE , reason = "hiredis is not installed"
51- ),
52- ),
32+ (False ,),
5333 ],
5434 ids = [
55- "single-python-parser" ,
56- "pool-python-parser" ,
57- "single-hiredis" ,
58- "pool-hiredis" ,
35+ "single" ,
36+ "pool" ,
5937 ],
6038)
6139async def create_valkey (request ):
6240 """Wrapper around valkey.create_valkey."""
63- single_connection , parser_cls = request .param
41+ ( single_connection ,) = request .param
6442
6543 teardown_clients = []
6644
@@ -76,10 +54,9 @@ async def client_factory(
7654 cluster_mode = VALKEY_INFO ["cluster_enabled" ]
7755 if not cluster_mode :
7856 single = kwargs .pop ("single_connection_client" , False ) or single_connection
79- parser_class = kwargs .pop ("parser_class" , None ) or parser_cls
8057 url_options = parse_url (url )
8158 url_options .update (kwargs )
82- pool = valkey .ConnectionPool (parser_class = parser_class , ** url_options )
59+ pool = valkey .ConnectionPool (** url_options )
8360 client = cls (connection_pool = pool )
8461 else :
8562 client = valkey .ValkeyCluster .from_url (url , ** kwargs )
0 commit comments