From 4e35e0cb7891f2c50bfcdaf6d290ba92aa9b75e7 Mon Sep 17 00:00:00 2001 From: Colby Mchenry Date: Wed, 21 Oct 2026 07:34:41 +0000 Subject: [PATCH] test(python): the module-resolution tests remove their temp dir after indexing (#2734) python-module-resolution.test.ts removed a test's temp dir only when the test never opened a CodeGraph (`if (cg) cg.destroy(); else if ...`), and destroy() closes the database without deleting anything. So every test that indexed left its codegraph-pymod-* dir behind, 47 per full run, passing or not, since PR #1921 added the file. The dev box's %TEMP% held 1,739 of them by 2026-10-21. The dir is now removed after destroy(), as the other test files do. Checked with a private TEMP: main's file leaves 47 codegraph-pymod-* dirs, this one none, and its 50 tests pass both ways. Co-Authored-By: Claude Opus 5.5 --- __tests__/python-module-resolution.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tests__/python-module-resolution.test.ts b/__tests__/python-module-resolution.test.ts index dca9ddcd2..05350950b 100644 --- a/__tests__/python-module-resolution.test.ts +++ b/__tests__/python-module-resolution.test.ts @@ -26,7 +26,7 @@ describe('Python module resolution', () => { afterEach(() => { if (cg) cg.destroy(); - else if (fs.existsSync(tempDir)) fs.rmSync(tempDir, { recursive: true, force: true }); + if (fs.existsSync(tempDir)) fs.rmSync(tempDir, { recursive: true, force: true }); }); function write(files: Record): void {