We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e9446f commit eea4417Copy full SHA for eea4417
1 file changed
tests/test_basics.py
@@ -5,17 +5,28 @@
5
import objectbox.version
6
from tests.model import TestEntity
7
8
+db_name = 'testdata'
9
+
10
11
+def remove_test_db():
12
+ if os.path.exists(db_name):
13
+ shutil.rmtree(db_name)
14
15
+# cleanup before and after each testcase
16
+@pytest.fixture(autouse=True)
17
+def run_around_tests():
18
+ remove_test_db()
19
+ yield # run the test function
20
21
22
23
def test_version():
24
info = objectbox.version.version_info()
25
assert len(info) > 10
26
27
28
def load_empty_test_objectbox() -> objectbox.ObjectBox:
- db_name = 'testdata'
-
- if os.path.exists(db_name):
- shutil.rmtree(db_name)
29
30
31
model = objectbox.Model()
32
from objectbox.model import IdUid
0 commit comments