@@ -5,7 +5,7 @@ import * as path from 'path';
55import { CancellationTokenSource , Uri } from 'vscode' ;
66import { CancellationToken } from 'vscode-jsonrpc' ;
77import { ChildProcess } from 'child_process' ;
8- import { IConfigurationService , ITestOutputChannel } from '../../../common/types' ;
8+ import { IConfigurationService } from '../../../common/types' ;
99import { EXTENSION_ROOT_DIR } from '../../../constants' ;
1010import {
1111 DiscoveredTestPayload ,
@@ -22,12 +22,7 @@ import {
2222 IPythonExecutionFactory ,
2323 SpawnOptions ,
2424} from '../../../common/process/types' ;
25- import {
26- MESSAGE_ON_TESTING_OUTPUT_MOVE ,
27- createDiscoveryErrorPayload ,
28- fixLogLinesNoTrailing ,
29- startDiscoveryNamedPipe ,
30- } from '../common/utils' ;
25+ import { createDiscoveryErrorPayload , fixLogLinesNoTrailing , startDiscoveryNamedPipe } from '../common/utils' ;
3126import { traceError , traceInfo , traceLog , traceVerbose } from '../../../logging' ;
3227import { getEnvironment , runInBackground , useEnvExtension } from '../../../envExt/api.internal' ;
3328
@@ -37,7 +32,6 @@ import { getEnvironment, runInBackground, useEnvExtension } from '../../../envEx
3732export class UnittestTestDiscoveryAdapter implements ITestDiscoveryAdapter {
3833 constructor (
3934 public configSettings : IConfigurationService ,
40- private readonly outputChannel : ITestOutputChannel ,
4135 private readonly resultResolver ?: ITestResultResolver ,
4236 private readonly envVarsService ?: IEnvironmentVariablesProvider ,
4337 ) { }
@@ -79,7 +73,6 @@ export class UnittestTestDiscoveryAdapter implements ITestDiscoveryAdapter {
7973 workspaceFolder : uri ,
8074 command,
8175 cwd,
82- outChannel : this . outputChannel ,
8376 token,
8477 } ;
8578
@@ -128,15 +121,12 @@ export class UnittestTestDiscoveryAdapter implements ITestDiscoveryAdapter {
128121 proc . stdout . on ( 'data' , ( data ) => {
129122 const out = fixLogLinesNoTrailing ( data . toString ( ) ) ;
130123 traceInfo ( out ) ;
131- this . outputChannel ?. append ( out ) ;
132124 } ) ;
133125 proc . stderr . on ( 'data' , ( data ) => {
134126 const out = fixLogLinesNoTrailing ( data . toString ( ) ) ;
135127 traceError ( out ) ;
136- this . outputChannel ?. append ( out ) ;
137128 } ) ;
138129 proc . onExit ( ( code , signal ) => {
139- this . outputChannel ?. append ( MESSAGE_ON_TESTING_OUTPUT_MOVE ) ;
140130 if ( code !== 0 ) {
141131 traceError (
142132 `Subprocess exited unsuccessfully with exit code ${ code } and signal ${ signal } on workspace ${ uri . fsPath } ` ,
@@ -155,7 +145,6 @@ export class UnittestTestDiscoveryAdapter implements ITestDiscoveryAdapter {
155145 token : options . token ,
156146 cwd : options . cwd ,
157147 throwOnStdErr : true ,
158- outputChannel : options . outChannel ,
159148 env : mutableEnv ,
160149 } ;
161150
@@ -187,22 +176,17 @@ export class UnittestTestDiscoveryAdapter implements ITestDiscoveryAdapter {
187176 resultProc = result ?. proc ;
188177
189178 // Displays output to user and ensure the subprocess doesn't run into buffer overflow.
190- // TODO: after a release, remove discovery output from the "Python Test Log" channel and send it to the "Python" channel instead.
191- // TODO: after a release, remove run output from the "Python Test Log" channel and send it to the "Test Result" channel instead.
192179 result ?. proc ?. stdout ?. on ( 'data' , ( data ) => {
193180 const out = fixLogLinesNoTrailing ( data . toString ( ) ) ;
194- spawnOptions ?. outputChannel ?. append ( `${ out } ` ) ;
195181 traceInfo ( out ) ;
196182 } ) ;
197183 result ?. proc ?. stderr ?. on ( 'data' , ( data ) => {
198184 const out = fixLogLinesNoTrailing ( data . toString ( ) ) ;
199- spawnOptions ?. outputChannel ?. append ( `${ out } ` ) ;
200185 traceError ( out ) ;
201186 } ) ;
202187
203188 result ?. proc ?. on ( 'exit' , ( code , signal ) => {
204189 // if the child has testIds then this is a run request
205- spawnOptions ?. outputChannel ?. append ( MESSAGE_ON_TESTING_OUTPUT_MOVE ) ;
206190
207191 if ( code !== 0 ) {
208192 // This occurs when we are running discovery
0 commit comments