Skip to content

Commit 7a1fe28

Browse files
committed
move pymemcache args test to pymemcache-specific fixture
this was failing on a generic tox run due to dependencies Change-Id: I25806a256e6e5f876a1c896e6a76bec976612cef
1 parent 3639099 commit 7a1fe28

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

tests/cache/test_memcached_backend.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,20 @@ class BMemcachedSerializerTest(
171171
class 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

175189
class 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

358358
class LocalThreadTest(TestCase):
359359
def setUp(self):

0 commit comments

Comments
 (0)