@@ -1208,6 +1208,12 @@ def test_stralgo_lcs(self, r):
12081208 value1 = 'ohmytext'
12091209 value2 = 'mynewtext'
12101210 res = 'mytext'
1211+
1212+ if skip_if_redis_enterprise (None ).args [0 ] is True :
1213+ with pytest .raises (redis .exceptions .ResponseError ):
1214+ assert r .stralgo ('LCS' , value1 , value2 ) == res
1215+ return
1216+
12111217 # test LCS of strings
12121218 assert r .stralgo ('LCS' , value1 , value2 ) == res
12131219 # test using keys
@@ -1250,6 +1256,12 @@ def test_strlen(self, r):
12501256
12511257 def test_substr (self , r ):
12521258 r ['a' ] = '0123456789'
1259+
1260+ if skip_if_redis_enterprise (None ).args [0 ] is True :
1261+ with pytest .raises (redis .exceptions .ResponseError ):
1262+ assert r .substr ('a' , 0 ) == b'0123456789'
1263+ return
1264+
12531265 assert r .substr ('a' , 0 ) == b'0123456789'
12541266 assert r .substr ('a' , 2 ) == b'23456789'
12551267 assert r .substr ('a' , 3 , 5 ) == b'345'
@@ -3617,13 +3629,24 @@ def test_memory_doctor(self, r):
36173629
36183630 @skip_if_server_version_lt ('4.0.0' )
36193631 def test_memory_malloc_stats (self , r ):
3632+ if skip_if_redis_enterprise (None ).args [0 ] is True :
3633+ with pytest .raises (redis .exceptions .ResponseError ):
3634+ assert r .memory_malloc_stats ()
3635+ return
3636+
36203637 assert r .memory_malloc_stats ()
36213638
36223639 @skip_if_server_version_lt ('4.0.0' )
36233640 def test_memory_stats (self , r ):
36243641 # put a key into the current db to make sure that "db.<current-db>"
36253642 # has data
36263643 r .set ('foo' , 'bar' )
3644+
3645+ if skip_if_redis_enterprise (None ).args [0 ] is True :
3646+ with pytest .raises (redis .exceptions .ResponseError ):
3647+ stats = r .memory_stats ()
3648+ return
3649+
36273650 stats = r .memory_stats ()
36283651 assert isinstance (stats , dict )
36293652 for key , value in stats .items ():
0 commit comments