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

Function test_insert_on_existing_db

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

Source from the content-addressed store, hash-verified

684
685
686def test_insert_on_existing_db(tmpdir):
687 path = str(tmpdir.join('db.json'))
688
689 db = TinyDB(path, ensure_ascii=False)
690 db.insert({'foo': 'bar'})
691
692 assert len(db) == 1
693
694 db.close()
695
696 db = TinyDB(path, ensure_ascii=False)
697 db.insert({'foo': 'bar'})
698 db.insert({'foo': 'bar'})
699
700 assert len(db) == 3
701
702
703def test_storage_access():

Callers

nothing calls this directly

Calls 3

closeMethod · 0.95
TinyDBClass · 0.90
insertMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…