MCPcopy
hub / github.com/PDFMathTranslate/PDFMathTranslate / clean_test_db

Function clean_test_db

pdf2zh/cache.py:132–143  ·  view source on GitHub ↗
(test_db)

Source from the content-addressed store, hash-verified

130
131
132def clean_test_db(test_db):
133 test_db.drop_tables([_TranslationCache])
134 test_db.close()
135 db_path = test_db.database
136 if os.path.exists(db_path):
137 os.remove(test_db.database)
138 wal_path = db_path + "-wal"
139 if os.path.exists(wal_path):
140 os.remove(wal_path)
141 shm_path = db_path + "-shm"
142 if os.path.exists(shm_path):
143 os.remove(shm_path)
144
145
146init_db()

Callers

nothing calls this directly

Calls 1

removeMethod · 0.80

Tested by

no test coverage detected