File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,8 @@ def pytest_sessionstart(session):
139139 REDIS_INFO ["arch_bits" ] = arch_bits
140140 REDIS_INFO ["cluster_enabled" ] = cluster_enabled
141141 REDIS_INFO ["enterprise" ] = info ["enterprise" ]
142+ # store REDIS_INFO in config so that it is available from "condition strings"
143+ session .config .REDIS_INFO = REDIS_INFO
142144
143145 # module info, if the second redis is running
144146 try :
Original file line number Diff line number Diff line change @@ -39,14 +39,14 @@ async def _get_info(redis_url):
3939 pytest .param (
4040 (True , PythonParser ),
4141 marks = pytest .mark .skipif (
42- 'REDIS_INFO["cluster_enabled"]' , reason = "cluster mode enabled"
42+ 'config. REDIS_INFO["cluster_enabled"]' , reason = "cluster mode enabled"
4343 ),
4444 ),
4545 (False , PythonParser ),
4646 pytest .param (
4747 (True , HiredisParser ),
4848 marks = pytest .mark .skipif (
49- not HIREDIS_AVAILABLE or 'REDIS_INFO["cluster_enabled"]' ,
49+ not HIREDIS_AVAILABLE or 'config. REDIS_INFO["cluster_enabled"]' ,
5050 reason = "hiredis is not installed or cluster mode enabled" ,
5151 ),
5252 ),
You can’t perform that action at this time.
0 commit comments