diff --git a/pylibmc.py b/pylibmc.py index f24c80b..30260f7 100644 --- a/pylibmc.py +++ b/pylibmc.py @@ -8,11 +8,11 @@ minor differences. If you should happen to spot any, file a bug! >>> b = mc.behaviors >>> ks = list(sorted(k for k in b.keys() if not k.startswith("_"))) >>> ks # doctest: +NORMALIZE_WHITESPACE -['binary_protocol', 'buffer_requests', 'cache_lookups', 'connect_timeout', - 'distribution', 'hash', 'ketama', 'ketama_hash', 'ketama_weighted', - 'no block', 'poll_timeout', 'rcv_timeout', 'retry_timeout', - 'server_failure_limit', 'snd_timeout', 'socket recv size', 'socket send size', - 'sort_hosts', 'support_cas', 'tcp_nodelay', 'udp', 'verify_key'] +['buffer_requests', 'cache_lookups', 'connect_timeout', 'distribution', 'hash', + 'ketama', 'ketama_hash', 'ketama_weighted', 'no block', 'poll_timeout', + 'rcv_timeout', 'retry_timeout', 'server_failure_limit', 'snd_timeout', + 'socket recv size', 'socket send size', 'sort_hosts', 'support_cas', + 'tcp_nodelay', 'verify_key'] >>> b["hash"] 'default' >>> b["hash"] = 'fnv1a_32' diff --git a/tests.py b/tests.py index 64dc1f5..272a121 100644 --- a/tests.py +++ b/tests.py @@ -133,6 +133,15 @@ Behaviors. >>> list(sorted((k, v) for (k, v) in c.get_behaviors().items() ... if k in ("tcp_nodelay", "hash"))) [('hash', 6), ('tcp_nodelay', 1)] + +Binary protocol! +>>> c = _pylibmc.client([test_server], binary=True) +>>> c.set("hello", "world") +True +>>> c.get("hello") +'world' +>>> c.delete("hello") +True """ # Used to test pickling.