Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.
Python aicode-complexitycode-healthcode-intelligencecode-qualitydead-codedeveloper-toolsdocumentationgit-analyticsmcpopen-sourcepythonrefactoringstatic-analysistechnical-debt
fix(tests): close the sqlite connection before renaming the folder (#3696)
X773e1e087aa260
diff --git a/tests/unit/cli/test_next_cmd.py b/tests/unit/cli/test_next_cmd.pyindex 3d32158bc..952e91902 100644--- a/tests/unit/cli/test_next_cmd.py+++ b/tests/unit/cli/test_next_cmd.py@@ -10,6 +10,7 @@ import asyncioimport datetimeimport jsonimport sqlite3+from contextlib import closingfrom pathlib import Pathfrom typing import Any@@ -264,7 +265,7 @@ def test_reads_a_repo_local_index_after_the_folder_is_moved(asyncio.run(_build_index(original))if outdated_schema:# Reconciliation must finish before the relocated repository is read.- with sqlite3.connect(original / ".repowise" / "wiki.db") as conn:+ with closing(sqlite3.connect(original / ".repowise" / "wiki.db")) as conn:conn.execute("ALTER TABLE health_file_metrics DROP COLUMN analyzed_commit")moved = tmp_path / "moved"original.rename(moved)