Skip to content

Commit 204ba66

Browse files
committed
tests: comment cleanup_db() (not needed) #25
1 parent 2366463 commit 204ba66

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

tests/conftest.py

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

65

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

109

11-
def _clear_test_db():
12-
Store.remove_db_files("testdata")
13-
14-
1510
@pytest.fixture(autouse=True)
1611
def cleanup_db():
17-
""" Fixture to ensure tests starts fresh and the DB is cleaned up on success/failure. """
18-
_clear_test_db()
19-
try:
20-
yield # Run the test code
21-
finally:
22-
_clear_test_db()
12+
# Not needed: every test clears the DB on start, without deleting it on exit (not necessary)
13+
# Also, here we have no information regarding the DB path being used (although usually is "testdata")
14+
pass

0 commit comments

Comments
 (0)