Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
executable file 47 lines (37 sloc) 1.39 KB
#!/usr/bin/env python
"""Run nosetests with build/lib.* in sys.path"""
# Fix up sys.path so as to include the correct build/lib.*/ directory.
import sys
from distutils.dist import Distribution
from import build
build_cmd = build(Distribution({"ext_modules": True}))
lib_dirn = build_cmd.build_lib
sys.path.insert(0, lib_dirn)
# Dump info plugin stuff
import nose
import logging
from nose.plugins import Plugin
logger = logging.getLogger("nose.plugins.pylibmc")
def dump_infos():"injected path: %s", lib_dirn)
import pylibmc, _pylibmc
if hasattr(_pylibmc, "__file__"):"loaded _pylibmc from %s", _pylibmc.__file__)
if not _pylibmc.__file__.startswith(lib_dirn):
logger.warn("double-check the source path")
logger.warn("static _pylibmc: %s", _pylibmc)"libmemcached version: %s", _pylibmc.libmemcached_version)"pylibmc version: %s", _pylibmc.__version__)"support compression: %s", _pylibmc.support_compression)"support sasl auth: %s", _pylibmc.support_sasl)
class PylibmcVersionDumper(Plugin):
name = "info"
enableOpt = "info"
def __init__(self):
def begin(self):
if __name__ == "__main__":
Something went wrong with that request. Please try again.