(test_db)
| 130 | |
| 131 | |
| 132 | def 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 | |
| 146 | init_db() |