summaryrefslogtreecommitdiff
path: root/pymemcache/test/conftest.py
diff options
context:
space:
mode:
authorJohn Anderson <sontek@gmail.com>2015-06-20 21:29:09 -0700
committerJohn Anderson <sontek@gmail.com>2015-06-20 21:29:09 -0700
commit24705082a2792f771ee7a2f07a602eb1f59febf6 (patch)
tree35c6e2c5adb29da76b571a78c9ab81c9d72470b2 /pymemcache/test/conftest.py
parent8879147dd735e8ddd410d823c66788e0d8164b2c (diff)
downloadpymemcache-24705082a2792f771ee7a2f07a602eb1f59febf6.tar.gz
Implemented the other functions and added tests
Diffstat (limited to 'pymemcache/test/conftest.py')
-rw-r--r--pymemcache/test/conftest.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/pymemcache/test/conftest.py b/pymemcache/test/conftest.py
index 8792cc3..5d1f9ce 100644
--- a/pymemcache/test/conftest.py
+++ b/pymemcache/test/conftest.py
@@ -33,3 +33,14 @@ def pytest_generate_tests(metafunc):
socket_modules.append(gevent_socket)
metafunc.parametrize("socket_module", socket_modules)
+
+ if 'client_class' in metafunc.fixturenames:
+ from pymemcache.client.base import PooledClient, Client
+ from pymemcache.client.hash import HashClient
+ class HashClientSingle(HashClient):
+ def __init__(self, server, *args, **kwargs):
+ super(HashClientSingle, self).__init__([server], *args, **kwargs)
+
+ metafunc.parametrize(
+ "client_class", [Client, PooledClient, HashClientSingle]
+ )