@@ -29,13 +29,7 @@ import {
29
29
getTestCaseNodes ,
30
30
RunTestTag ,
31
31
} 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' ;
39
33
import { fixLogLines } from './common/utils' ;
40
34
import { IPythonExecutionFactory } from '../../common/process/types' ;
41
35
import { ITestDebugLauncher } from '../common/types' ;
@@ -288,8 +282,6 @@ export class WorkspaceTestAdapter {
288
282
public async discoverTests (
289
283
testController : TestController ,
290
284
token ?: CancellationToken ,
291
- isMultiroot ?: boolean ,
292
- workspaceFilePath ?: string ,
293
285
executionFactory ?: IPythonExecutionFactory ,
294
286
) : Promise < void > {
295
287
sendTelemetryEvent ( EventName . UNITTEST_DISCOVERING , undefined , { tool : this . testProvider } ) ;
@@ -366,39 +358,6 @@ export class WorkspaceTestAdapter {
366
358
// then parse and insert test data.
367
359
testController . items . delete ( `DiscoveryError:${ workspacePath } ` ) ;
368
360
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
-
402
361
if ( rawTestData . tests ) {
403
362
// If the test root for this folder exists: Workspace refresh, update its children.
404
363
// Otherwise, it is a freshly discovered workspace, and we need to create a new test root and populate the test tree.
0 commit comments