Skip to content

Commit 8e1717d

Browse files
committed
Store: added remove_db_files #44
1 parent 921cc54 commit 8e1717d

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

objectbox/store.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,12 @@ def close(self):
182182
if c_store_to_close:
183183
self._c_store = None
184184
c.obx_store_close(c_store_to_close)
185+
186+
def remove_db_files(dir):
187+
"""
188+
Remove Database files
189+
190+
:param dir:
191+
Path to directory.
192+
"""
193+
c.obx_remove_db_files(c.c_str(dir))

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import pytest
22
from objectbox.logger import logger
33
from common import *
4-
4+
from objectbox.store import Store
55

66
# Fixtures in this file are used by all files in the same directory:
77
# https://docs.pytest.org/en/7.1.x/reference/fixtures.html#conftest-py-sharing-fixtures-across-multiple-files
88

99

1010
def _clear_test_db():
11-
obx_remove_db_files(c_str(test_dir))
11+
Store.remove_db_files(test_dir)
1212

1313

1414
@pytest.fixture(autouse=True)

0 commit comments

Comments
 (0)