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

Function test_update

tests/test_tinydb.py:214–220  ·  view source on GitHub ↗
(db: TinyDB)

Source from the content-addressed store, hash-verified

212
213
214def test_update(db: TinyDB):
215 assert len(db) == 3
216
217 db.update({'int': 2}, where('char') == 'a')
218
219 assert db.count(where('int') == 2) == 1
220 assert db.count(where('int') == 1) == 2
221
222
223def test_update_all(db: TinyDB):

Callers

nothing calls this directly

Calls 3

whereFunction · 0.90
countMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…