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

Function test_gc

tests/test_tinydb.py:563–572  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

561
562
563def test_gc(tmpdir):
564 # See https://github.com/msiemens/tinydb/issues/92
565 path = str(tmpdir.join('db.json'))
566 db = TinyDB(path)
567 table = db.table('foo')
568 table.insert({'something': 'else'})
569 table.insert({'int': 13})
570 assert len(table.search(where('int') == 13)) == 1
571 assert table.all() == [{'something': 'else'}, {'int': 13}]
572 db.close()
573
574
575def test_drop_table():

Callers

nothing calls this directly

Calls 7

tableMethod · 0.95
closeMethod · 0.95
TinyDBClass · 0.90
whereFunction · 0.90
insertMethod · 0.80
searchMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…