Module Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias alias ImportFrom alias Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num Num Str body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Assign NameStore ListLoad Assign NameStore Num For NameStore AttributeLoad NameLoad attr body For NameStore Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Dict Str Str Str NameLoad AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore Num Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad ListLoad AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str Dict Str Str NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str Assign NameStore Call NameLoad GeneratorExp TupleLoad AttributeLoad NameLoad attr NameLoad comprehension NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr While NameLoad body For NameStore Call AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Break If CompareGt Call AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad body Return NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr TryExcept body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type TupleLoad NameLoad NameLoad body Pass decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass decorator_list decorator_list FunctionDef arguments args defaults vararg kwarg body Expr Str With Call NameLoad NameLoad NameLoad NameStore body Assign NameStore Call AttributeLoad NameLoad attr TryFinally body Expr Yield NameLoad finalbody Expr Call AttributeLoad NameLoad attr decorator_list NameLoad
N/A N/A os N/A time N/A uuid N/A shutil N/A socket N/A tempfile contextlib contextmanager subprocess Popen PIPE rb.cluster Cluster N/A devnull N/A open N/A os devnull r+ Server N/A object N/A __init__ N/A N/A self cl socket_path N/A N/A N/A N/A self _cl cl N/A N/A self socket_path socket_path N/A test_connection N/A N/A self N/A N/A N/A N/A N/A s N/A N/A socket socket N/A socket AF_UNIX N/A socket SOCK_STREAM N/A N/A N/A s connect N/A self socket_path N/A N/A N/A IOError N/A N/A False N/A True N/A signal_stop N/A N/A self N/A N/A N/A N/A N/A self _cl None N/A N/A N/A N/A N/A self _cl kill N/A close N/A N/A self N/A N/A N/A N/A N/A self _cl None N/A N/A N/A N/A self signal_stop N/A N/A N/A N/A self _cl wait N/A N/A self _cl None N/A N/A N/A N/A N/A os remove N/A self socket_path N/A N/A N/A OSError N/A N/A N/A N/A TestSetup N/A object N/A N/A The test setup is a convenient way to spawn multiple redis servers
    for testing and to shut them down automatically.  This can be used as
    a context manager to automatically terminate the clients.
     __init__ N/A N/A self servers databases_each server_executable N/A 4 8 redis-server N/A N/A N/A self _fd_dir N/A N/A tempfile mkdtemp N/A N/A self databases_each databases_each N/A N/A self server_executable server_executable N/A N/A self servers N/A N/A server N/A xrange servers N/A N/A N/A N/A self spawn_server N/A __enter__ N/A N/A self N/A N/A N/A self N/A __exit__ N/A N/A self exc_type exc_value tb N/A N/A N/A N/A N/A self close N/A make_cluster N/A N/A self N/A N/A N/A Creates a correctly configured cluster from the servers
        spawned.  This also automatically waits for the servers to be up.
         N/A N/A N/A self wait_for_servers N/A hosts N/A N/A host_id 0 N/A server N/A self servers N/A N/A x N/A xrange N/A self databases_each N/A N/A N/A N/A hosts append N/A host_id unix_socket_path db host_id N/A server socket_path x N/A host_id 1 N/A N/A Cluster hosts N/A spawn_server N/A N/A self N/A N/A N/A Spawns a new server and adds it to the pool. N/A socket_path N/A N/A N/A os path join N/A self _fd_dir N/A str N/A N/A uuid uuid4 N/A cl N/A Popen N/A N/A self server_executable - stdin PIPE stdout devnull N/A N/A N/A N/A cl stdin write N/A 
        port 0
        unixsocket %(path)s
        databases %(databases)d
        save ""
         N/A path databases socket_path N/A self databases_each N/A N/A N/A N/A cl stdin flush N/A N/A N/A N/A cl stdin close N/A N/A N/A N/A self servers append N/A Server cl socket_path N/A wait_for_servers N/A N/A self timeout N/A 10 N/A N/A Waits for all servers to to be up and running. N/A unconnected_servers N/A dict N/A N/A N/A x socket_path x N/A x N/A self servers N/A now N/A N/A time time N/A unconnected_servers N/A N/A server N/A N/A unconnected_servers itervalues N/A N/A N/A N/A server test_connection N/A N/A N/A N/A unconnected_servers pop N/A server socket_path None N/A N/A N/A N/A N/A time time N/A now timeout N/A N/A False N/A unconnected_servers N/A N/A N/A N/A time sleep 0.05 N/A True N/A close N/A N/A self N/A N/A N/A Closes the test setup which shuts down all redis servers. N/A server N/A self servers N/A N/A N/A N/A server signal_stop N/A server N/A self servers N/A N/A N/A N/A server close N/A N/A N/A N/A N/A shutil rmtree N/A self _fd_dir N/A N/A N/A N/A OSError IOError N/A N/A N/A __del__ N/A N/A self N/A N/A N/A N/A N/A N/A N/A self close N/A N/A N/A Exception N/A N/A N/A N/A make_test_cluster N/A N/A N/A args kwargs N/A N/A Convenient shortcut for creating a test setup and then a cluster
    from it.  This must be used as a context manager::

        from rb.testing import make_test_cluster
        with make_test_cluster() as cluster:
            ...
     N/A N/A TestSetup args kwargs ts N/A N/A cluster N/A N/A ts make_cluster N/A N/A N/A N/A cluster N/A N/A N/A N/A cluster disconnect_pools N/A contextmanager