@@ -5,7 +5,7 @@ import * as path from 'path';
5
5
import { CancellationTokenSource , Uri } from 'vscode' ;
6
6
import { CancellationToken } from 'vscode-jsonrpc' ;
7
7
import { ChildProcess } from 'child_process' ;
8
- import { IConfigurationService , ITestOutputChannel } from '../../../common/types' ;
8
+ import { IConfigurationService } from '../../../common/types' ;
9
9
import { EXTENSION_ROOT_DIR } from '../../../constants' ;
10
10
import {
11
11
DiscoveredTestPayload ,
@@ -22,12 +22,7 @@ import {
22
22
IPythonExecutionFactory ,
23
23
SpawnOptions ,
24
24
} 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' ;
31
26
import { traceError , traceInfo , traceLog , traceVerbose } from '../../../logging' ;
32
27
import { getEnvironment , runInBackground , useEnvExtension } from '../../../envExt/api.internal' ;
33
28
@@ -37,7 +32,6 @@ import { getEnvironment, runInBackground, useEnvExtension } from '../../../envEx
37
32
export class UnittestTestDiscoveryAdapter implements ITestDiscoveryAdapter {
38
33
constructor (
39
34
public configSettings : IConfigurationService ,
40
- private readonly outputChannel : ITestOutputChannel ,
41
35
private readonly resultResolver ?: ITestResultResolver ,
42
36
private readonly envVarsService ?: IEnvironmentVariablesProvider ,
43
37
) { }
@@ -79,7 +73,6 @@ export class UnittestTestDiscoveryAdapter implements ITestDiscoveryAdapter {
79
73
workspaceFolder : uri ,
80
74
command,
81
75
cwd,
82
- outChannel : this . outputChannel ,
83
76
token,
84
77
} ;
85
78
@@ -128,15 +121,12 @@ export class UnittestTestDiscoveryAdapter implements ITestDiscoveryAdapter {
128
121
proc . stdout . on ( 'data' , ( data ) => {
129
122
const out = fixLogLinesNoTrailing ( data . toString ( ) ) ;
130
123
traceInfo ( out ) ;
131
- this . outputChannel ?. append ( out ) ;
132
124
} ) ;
133
125
proc . stderr . on ( 'data' , ( data ) => {
134
126
const out = fixLogLinesNoTrailing ( data . toString ( ) ) ;
135
127
traceError ( out ) ;
136
- this . outputChannel ?. append ( out ) ;
137
128
} ) ;
138
129
proc . onExit ( ( code , signal ) => {
139
- this . outputChannel ?. append ( MESSAGE_ON_TESTING_OUTPUT_MOVE ) ;
140
130
if ( code !== 0 ) {
141
131
traceError (
142
132
`Subprocess exited unsuccessfully with exit code ${ code } and signal ${ signal } on workspace ${ uri . fsPath } ` ,
@@ -155,7 +145,6 @@ export class UnittestTestDiscoveryAdapter implements ITestDiscoveryAdapter {
155
145
token : options . token ,
156
146
cwd : options . cwd ,
157
147
throwOnStdErr : true ,
158
- outputChannel : options . outChannel ,
159
148
env : mutableEnv ,
160
149
} ;
161
150
@@ -187,22 +176,17 @@ export class UnittestTestDiscoveryAdapter implements ITestDiscoveryAdapter {
187
176
resultProc = result ?. proc ;
188
177
189
178
// 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.
192
179
result ?. proc ?. stdout ?. on ( 'data' , ( data ) => {
193
180
const out = fixLogLinesNoTrailing ( data . toString ( ) ) ;
194
- spawnOptions ?. outputChannel ?. append ( `${ out } ` ) ;
195
181
traceInfo ( out ) ;
196
182
} ) ;
197
183
result ?. proc ?. stderr ?. on ( 'data' , ( data ) => {
198
184
const out = fixLogLinesNoTrailing ( data . toString ( ) ) ;
199
- spawnOptions ?. outputChannel ?. append ( `${ out } ` ) ;
200
185
traceError ( out ) ;
201
186
} ) ;
202
187
203
188
result ?. proc ?. on ( 'exit' , ( code , signal ) => {
204
189
// if the child has testIds then this is a run request
205
- spawnOptions ?. outputChannel ?. append ( MESSAGE_ON_TESTING_OUTPUT_MOVE ) ;
206
190
207
191
if ( code !== 0 ) {
208
192
// This occurs when we are running discovery
0 commit comments