File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import pytest
22from objectbox .logger import logger
33from 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 )
1611def 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
You can’t perform that action at this time.
0 commit comments