Skip to content

Commit 96ba735

Browse files
authored
fix data to string from buffer for output channel (#21821)
fix #21820
1 parent 5140a8d commit 96ba735

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/client/testing/testController/common/server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ export class PythonTestServer implements ITestServer, Disposable {
213213
// Take all output from the subprocess and add it to the test output channel. This will be the pytest output.
214214
// Displays output to user and ensure the subprocess doesn't run into buffer overflow.
215215
result?.proc?.stdout?.on('data', (data) => {
216-
spawnOptions?.outputChannel?.append(data);
216+
spawnOptions?.outputChannel?.append(data.toString());
217217
});
218218
result?.proc?.stderr?.on('data', (data) => {
219-
spawnOptions?.outputChannel?.append(data);
219+
spawnOptions?.outputChannel?.append(data.toString());
220220
});
221221
result?.proc?.on('exit', () => {
222222
traceLog('Exec server closed.', uuid);

src/client/testing/testController/pytest/pytestDiscoveryAdapter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ export class PytestTestDiscoveryAdapter implements ITestDiscoveryAdapter {
8989
// Take all output from the subprocess and add it to the test output channel. This will be the pytest output.
9090
// Displays output to user and ensure the subprocess doesn't run into buffer overflow.
9191
result?.proc?.stdout?.on('data', (data) => {
92-
spawnOptions.outputChannel?.append(data);
92+
spawnOptions.outputChannel?.append(data.toString());
9393
});
9494
result?.proc?.stderr?.on('data', (data) => {
95-
spawnOptions.outputChannel?.append(data);
95+
spawnOptions.outputChannel?.append(data.toString());
9696
});
9797
result?.proc?.on('exit', () => {
9898
deferredExec.resolve({ stdout: '', stderr: '' });

src/client/testing/testController/pytest/pytestExecutionAdapter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,10 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
169169
// Take all output from the subprocess and add it to the test output channel. This will be the pytest output.
170170
// Displays output to user and ensure the subprocess doesn't run into buffer overflow.
171171
result?.proc?.stdout?.on('data', (data) => {
172-
this.outputChannel?.append(data);
172+
this.outputChannel?.append(data.toString());
173173
});
174174
result?.proc?.stderr?.on('data', (data) => {
175-
this.outputChannel?.append(data);
175+
this.outputChannel?.append(data.toString());
176176
});
177177

178178
result?.proc?.on('exit', () => {

0 commit comments

Comments
 (0)