@@ -171,6 +171,20 @@ class BMemcachedSerializerTest(
171171class PyMemcacheTest (_NonDistributedMemcachedTest ):
172172 backend = "dogpile.cache.pymemcache"
173173
174+ def test_pymemcache_enable_retry_client_not_set (self ):
175+ with mock .patch ("warnings.warn" ) as warn_mock :
176+ _ = make_region ().configure (
177+ "dogpile.cache.pymemcache" ,
178+ arguments = {"url" : "foo" , "retry_attempts" : 2 },
179+ )
180+ eq_ (
181+ warn_mock .mock_calls [0 ],
182+ mock .call (
183+ "enable_retry_client is not set; retry options "
184+ "will be ignored"
185+ ),
186+ )
187+
174188
175189class PyMemcacheDistributedWithTimeoutTest (
176190 _DistributedMemcachedWithTimeoutTest
@@ -340,20 +354,6 @@ def test_set_min_compress_len(self):
340354 backend .set ("foo" , "bar" )
341355 eq_ (backend ._clients .memcached .canary , [{"min_compress_len" : 20 }])
342356
343- def test_pymemcache_enable_retry_client_not_set (self ):
344- with mock .patch ("warnings.warn" ) as warn_mock :
345- _ = make_region ().configure (
346- "dogpile.cache.pymemcache" ,
347- arguments = {"url" : "foo" , "retry_attempts" : 2 },
348- )
349- eq_ (
350- warn_mock .mock_calls [0 ],
351- mock .call (
352- "enable_retry_client is not set; retry options "
353- "will be ignored"
354- ),
355- )
356-
357357
358358class LocalThreadTest (TestCase ):
359359 def setUp (self ):
0 commit comments