fix: close KnowledgeGraph SQLite connections in test fixtures (#450)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
7. Sun
2026-04-12 07:14:23 +01:00
committed by GitHub
parent d82bbe754c
commit 15d9ee1b51
+3 -1
View File
@@ -169,7 +169,9 @@ def seeded_collection(collection):
def kg(tmp_dir):
"""An isolated KnowledgeGraph using a temp SQLite file."""
db_path = os.path.join(tmp_dir, "test_kg.sqlite3")
return KnowledgeGraph(db_path=db_path)
graph = KnowledgeGraph(db_path=db_path)
yield graph
graph.close()
@pytest.fixture