Skip to content

Listen for added workspace folders to also testing.activateLegacyWorkspace() them#26012

Open
vaclavHala wants to merge 4 commits into
microsoft:mainfrom
vaclavHala:test-legacy-init-added-workspace-folders
Open

Listen for added workspace folders to also testing.activateLegacyWorkspace() them#26012
vaclavHala wants to merge 4 commits into
microsoft:mainfrom
vaclavHala:test-legacy-init-added-workspace-folders

Conversation

@vaclavHala

Copy link
Copy Markdown

Fixes #26011

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses #26011 by ensuring legacy testing adapters are initialized for workspace folders that are added after the Python extension has already activated, so test discovery works without requiring a VS Code restart.

Changes:

  • In legacy mode, register a onDidChangeWorkspaceFolders listener and call activateLegacyWorkspace() for newly added folders.
  • Add a unit test covering discovery in a workspace folder added post-activation.
Show a summary per file
File Description
src/client/testing/testController/controller.ts Hooks workspace-folder additions in legacy mode to initialize per-workspace legacy test adapters.
src/test/testing/testController/controller.unit.test.ts Adds coverage to ensure discovery works for folders added after activation.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment thread src/client/testing/testController/controller.ts
Comment thread src/test/testing/testController/controller.unit.test.ts
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@eleanorjboyd eleanorjboyd added the bug Issue identified by VS Code Team member as probable bug label Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue identified by VS Code Team member as probable bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Legacy discovery does not work for folders added to workspace after python extension activated

5 participants