Include main tests in doctests, testing behaviors better.
This commit is contained in:
parent
9fb94c12c0
commit
2af5ca0e40
11
tests.py
11
tests.py
@ -113,6 +113,13 @@ Complex data types!
|
||||
True
|
||||
>>> c.get("tengil").bar == bla.bar
|
||||
True
|
||||
|
||||
|
||||
Behaviors.
|
||||
>>> c.set_behaviors({"tcp_nodelay": True, "hash": 6})
|
||||
>>> list(sorted((k, v) for (k, v) in c.get_behaviors().items()
|
||||
... if k in ("tcp_nodelay", "hash")))
|
||||
[('hash', 6), ('tcp_nodelay', 1)]
|
||||
"""
|
||||
|
||||
# Used to test pickling.
|
||||
@ -131,9 +138,11 @@ else:
|
||||
print >>sys.stderr, "Using system-wide installation of pylibmc!"
|
||||
print >>sys.stderr, "==========================================\n"
|
||||
|
||||
import _pylibmc
|
||||
import pylibmc, _pylibmc
|
||||
import socket
|
||||
|
||||
__doc__ = pylibmc.__doc__ + "\n\n" + __doc__
|
||||
|
||||
test_server = (_pylibmc.server_type_tcp, "localhost", 11211)
|
||||
|
||||
def get_version(addr):
|
||||
|
Reference in New Issue
Block a user