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 <noreply@anthropic.com>
This commit is contained in:
Colby Mchenry
2026-10-21 07:34:41 +00:00
committed by GitHub
co-authored by Claude Opus 5.5
parent bdf288a76f
commit 4e35e0cb78
+1 -1
View File
@@ -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<string, string>): void {