Skip to content

Add workspace root to test explorer tree for multi-root scenario #22168

Description

Comes from this discussion: #22125 (reply in thread).

The issue is that in multi-root workspace where the "--rootdir", "${workspaceFolder}/tests" arg exists or the "python.testing.cwd": "${workspaceFolder}/tests", exists then the root is not the root of the multiroot workspace and therefore the root node on the test explorer is the defined rootdir instead of the root of the workspace. This leads to multiple workspace where it is has a tests folder per workspace to then just be displayed as such:

  • tests
    • test_1
    • test_2
    • test_3
  • tests
    • tests_a
    • tests_b
    • tests_c

the desired test explorer view would instead be:

  • workspace 1
    • tests
      • test_1
      • test_2
      • test_3
  • workspace 2
    • tests
      • tests_a
      • tests_b
      • tests_c

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions