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

Function test_zero_cache_size

tests/test_tables.py:98–107  ·  view source on GitHub ↗
(db)

Source from the content-addressed store, hash-verified

96
97
98def test_zero_cache_size(db):
99 table = db.table('table3', cache_size=0)
100 query = where('int') == 1
101
102 table.insert({'int': 1})
103 table.insert({'int': 1})
104
105 assert table.count(query) == 2
106 assert table.count(where('int') == 2) == 0
107 assert len(table._query_cache) == 0
108
109
110def test_query_cache_size(db):

Callers

nothing calls this directly

Calls 4

whereFunction · 0.90
tableMethod · 0.80
insertMethod · 0.80
countMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…