MCPcopy
hub / github.com/msiemens/tinydb / test_lambda_query

Function test_lambda_query

tests/test_tinydb.py:709–716  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

707
708
709def test_lambda_query():
710 db = TinyDB(storage=MemoryStorage)
711 db.insert({'foo': 'bar'})
712
713 query = lambda doc: doc.get('foo') == 'bar'
714 query.is_cacheable = lambda: False
715 assert db.search(query) == [{'foo': 'bar'}]
716 assert not db._query_cache

Callers

nothing calls this directly

Calls 4

TinyDBClass · 0.90
insertMethod · 0.80
getMethod · 0.45
searchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…