-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Labels
enhancementNew feature or requestNew feature or requestneeds-triageNew issue, not yet reviewed by maintainersNew issue, not yet reviewed by maintainers
Description
Is your feature request related to a problem? Please describe.
Several test classes use gc.collect() + time.sleep(0.1) in tearDown to work around resource cleanup timing issues with tempfile.TemporaryDirectory. This is fragile and was flagged during PR #181 review (comments here and here). Deferred from that PR to keep the bug fix focused.
Describe the solution you'd like
- Replace
gc.collect()+sleepwith explicit file handle cleanup or usetempfile.mkdtemp()withshutil.rmtree(ignore_errors=True)in tearDown. - Audit other test files for the same pattern and fix consistently.
Describe alternatives you've considered
- Keeping the current pattern (not ideal — adds unnecessary test latency and masks resource leaks).
Additional context
Affected files:
tests/unit/test_vscode_adapter.py— classesTestVSCodeStdioRegistryPackages,TestVSCodeInferRegistryName,TestVSCodeExtractPackageArgs,TestVSCodeRealApiFormat
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestneeds-triageNew issue, not yet reviewed by maintainersNew issue, not yet reviewed by maintainers