Пример #1
0
def db(request):
    """Return a data broker
    """
    from databroker.tests.utils import build_sqlite_backed_broker
    db = build_sqlite_backed_broker(request)
    db.reg.register_handler('NPY_SEQ', NumpySeqHandler)
    return db
Пример #2
0
def db(request):
    """Return a data broker
    """
    from databroker.tests.utils import build_sqlite_backed_broker
    db = build_sqlite_backed_broker(request)
    db.reg.register_handler('NPY_SEQ', NumpySeqHandler)
    return db
Пример #3
0
def ltdb(request):
    """Return a data broker
    """
    from databroker.tests.utils import build_sqlite_backed_broker
    db = build_sqlite_backed_broker(request)
    db.prepare_hook = lambda name, doc: copy.deepcopy(doc)
    return db
Пример #4
0
def broker_factory(request):
    "Use this to get more than one broker in a test."
    param_map = {'sqlite': lambda: build_sqlite_backed_broker(request),
                 'mongo': lambda: build_pymongo_backed_broker(request),
                 'hdf5': lambda: build_hdf5_backed_broker(request),
                 'client': lambda: build_client_backend_broker(request)}

    return param_map[request.param]
Пример #5
0
def ltdb(request):
    """Return a data broker
    """
    from databroker.tests.utils import build_sqlite_backed_broker

    db = build_sqlite_backed_broker(request)
    db.prepare_hook = lambda name, doc: copy.deepcopy(doc)
    reg = db.reg
    reg.register_handler("NPY_SEQ", NumpySeqHandler)
    return db
Пример #6
0
def ltdb(request):
    """Return a data broker
    """
    from databroker.tests.utils import build_sqlite_backed_broker

    db = build_sqlite_backed_broker(request)
    db.prepare_hook = lambda name, doc: copy.deepcopy(doc)
    reg = db.reg
    reg.register_handler("NPY_SEQ", NumpySeqHandler)
    return db
def db(request):
    from databroker.tests.utils import build_sqlite_backed_broker
    bk = build_sqlite_backed_broker(request)
    return bk
Пример #8
0
def ltdb(request):
    """Return a data broker
    """
    from databroker.tests.utils import build_sqlite_backed_broker
    db = build_sqlite_backed_broker(request)
    return db