@@ -29,13 +29,7 @@ import {
2929 getTestCaseNodes ,
3030 RunTestTag ,
3131} from './common/testItemUtilities' ;
32- import {
33- DiscoveredTestItem ,
34- DiscoveredTestNode ,
35- DiscoveredTestType ,
36- ITestDiscoveryAdapter ,
37- ITestExecutionAdapter ,
38- } from './common/types' ;
32+ import { DiscoveredTestItem , DiscoveredTestNode , ITestDiscoveryAdapter , ITestExecutionAdapter } from './common/types' ;
3933import { fixLogLines } from './common/utils' ;
4034import { IPythonExecutionFactory } from '../../common/process/types' ;
4135import { ITestDebugLauncher } from '../common/types' ;
@@ -288,8 +282,6 @@ export class WorkspaceTestAdapter {
288282 public async discoverTests (
289283 testController : TestController ,
290284 token ?: CancellationToken ,
291- isMultiroot ?: boolean ,
292- workspaceFilePath ?: string ,
293285 executionFactory ?: IPythonExecutionFactory ,
294286 ) : Promise < void > {
295287 sendTelemetryEvent ( EventName . UNITTEST_DISCOVERING , undefined , { tool : this . testProvider } ) ;
@@ -366,39 +358,6 @@ export class WorkspaceTestAdapter {
366358 // then parse and insert test data.
367359 testController . items . delete ( `DiscoveryError:${ workspacePath } ` ) ;
368360
369- // Wrap the data under a root node named after the test provider.
370- const wrappedTests = rawTestData . tests ;
371-
372- // If we are in a multiroot workspace scenario, wrap the current folder's test result in a tree under the overall root + the current folder name.
373- let rootPath = workspacePath ;
374- let childrenRootPath = rootPath ;
375- let childrenRootName = path . basename ( rootPath ) ;
376-
377- if ( isMultiroot ) {
378- rootPath = workspaceFilePath ! ;
379- childrenRootPath = workspacePath ;
380- childrenRootName = path . basename ( workspacePath ) ;
381- }
382-
383- const children = [
384- {
385- path : childrenRootPath ,
386- name : childrenRootName ,
387- type_ : 'folder' as DiscoveredTestType ,
388- id_ : childrenRootPath ,
389- children : wrappedTests ? [ wrappedTests ] : [ ] ,
390- } ,
391- ] ;
392-
393- // Update the raw test data with the wrapped data.
394- rawTestData . tests = {
395- path : rootPath ,
396- name : this . testProvider ,
397- type_ : 'folder' ,
398- id_ : rootPath ,
399- children,
400- } ;
401-
402361 if ( rawTestData . tests ) {
403362 // If the test root for this folder exists: Workspace refresh, update its children.
404363 // Otherwise, it is a freshly discovered workspace, and we need to create a new test root and populate the test tree.
0 commit comments