Skip to content

testing: remove the temp profile dir on close; pythonEnv tests clean up - #2

Merged
CSSFrancis merged 1 commit into
directelectron:mainfrom
TheDrOnos:fix/temp-dir-cleanup
Sep 24, 2026
Merged

CSSFrancis merged 1 commit into
directelectron:mainfrom
TheDrOnos:fix/temp-dir-cleanup

Conversation

@TheDrOnos

@TheDrOnos TheDrOnos commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Closes #1.

launchApp made the --user-data-dir with mkdtempSync inline and never kept the path, so nothing could remove it and every e2e launch left a <appId>-e2e-profile-* directory behind. closeApp now takes profileDir and removes it once the process is down, on the closed, killed and no-app paths alike; launchApp passes its own and reports it. pythonEnv.test.ts tracks the uv-stub-* / uv-none-* directories it makes and removes them in an after() hook.

Verified: npm run typecheck clean, npm run test:unit 91/91 (three new closeApp cases). The unit suite left 16 directories per run on main, 0 here. Two real Electron launches through the patched harness (a downstream app's e2e, Windows) left 0 profile directories, was 1 per launch.

launchApp made the --user-data-dir with mkdtempSync inline and never kept
the path, so nothing could remove it and every e2e launch left a
<appId>-e2e-profile-* directory behind. closeApp now takes profileDir and
removes it once the process is down, on the closed, killed and no-app
paths alike; launchApp passes its own and reports it. pythonEnv.test.ts
tracks the uv-stub-*/uv-none-* directories it makes and removes them in
an after() hook.
@CSSFrancis
CSSFrancis merged commit 51217dd into directelectron:main Sep 24, 2026
8 checks passed
CSSFrancis added a commit that referenced this pull request Sep 24, 2026
chore: drop CHANGELOG.md again, and file #2's entry as a fragment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

testing harness and pythonEnv test leave temp directories behind

2 participants