Skip to content

Commit 9d7310f

Browse files
author
Ivan Dlugos
committed
run cleanup automatically before & after each test
1 parent 8873787 commit 9d7310f

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

tests/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def remove_test_dir():
1414

1515
# cleanup before and after each testcase
1616
@pytest.fixture(autouse=True)
17-
def run_around_tests():
17+
def autocleanup():
1818
remove_test_dir()
1919
yield # run the test function
2020
remove_test_dir()

tests/test_basics.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import pytest
22
import objectbox
33
from tests.model import TestEntity
4-
from tests.common import load_empty_test_objectbox, assert_equal
5-
4+
from tests.common import autocleanup, load_empty_test_objectbox, assert_equal
65

76
def test_version():
87
info = objectbox.version_info()

0 commit comments

Comments
 (0)