fix(tests): fresh_db fixture가 매 test마다 db.DB_PATH 재패치 (cross-file isolation)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-23 02:08:01 +09:00
parent c5303151c0
commit 2ce6721c35
2 changed files with 4 additions and 0 deletions

View File

@@ -18,6 +18,8 @@ db.DB_PATH = _TMP
@pytest.fixture(autouse=True)
def fresh_db():
# Re-patch DB_PATH at the start of every test (cross-file isolation)
db.DB_PATH = _TMP
gc.collect()
if os.path.exists(_TMP):
os.remove(_TMP)