Skip to content

Commit cca205c

Browse files
committed
remove prints
1 parent 69ab0b8 commit cca205c

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

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

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,10 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
3838
debugLauncher?: ITestDebugLauncher,
3939
interpreter?: PythonEnvironment,
4040
): Promise<ExecutionTestPayload> {
41-
console.log('EJFB running tests');
4241
const deferredTillServerClose: Deferred<void> = utils.createTestingDeferred();
4342

4443
// create callback to handle data received on the named pipe
4544
const dataReceivedCallback = (data: ExecutionTestPayload) => {
46-
console.log('EJFB data received callback');
4745

4846
if (runInstance && !runInstance.token.isCancellationRequested) {
4947
this.resultResolver?.resolveExecution(data, runInstance);
@@ -60,8 +58,6 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
6058
cSource.token, // token to cancel
6159
);
6260
runInstance?.token.onCancellationRequested(() => {
63-
console.log('EJFB cancelation token hit!');
64-
6561
traceInfo(`Test run cancelled, resolving 'TillServerClose' deferred for ${uri.fsPath}.`);
6662
const executionPayload: ExecutionTestPayload = {
6763
cwd: uri.fsPath,
@@ -72,7 +68,6 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
7268
});
7369

7470
try {
75-
console.log('EJFB run tests new');
7671
await this.runTestsNew(
7772
uri,
7873
testIds,
@@ -85,8 +80,6 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
8580
interpreter,
8681
);
8782
} finally {
88-
console.log('EJFB await finally');
89-
9083
await deferredTillServerClose.promise;
9184
}
9285

@@ -111,7 +104,6 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
111104
debugLauncher?: ITestDebugLauncher,
112105
interpreter?: PythonEnvironment,
113106
): Promise<ExecutionTestPayload> {
114-
console.log('EJFB running tests 2222');
115107

116108
const relativePathToPytest = 'python_files';
117109
const fullPluginPath = path.join(EXTENSION_ROOT_DIR, relativePathToPytest);
@@ -122,7 +114,6 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
122114
const mutableEnv = {
123115
...(await this.envVarsService?.getEnvironmentVariables(uri)),
124116
};
125-
console.log('EJFB after env vars service');
126117
// get python path from mutable env, it contains process.env as well
127118
const pythonPathParts: string[] = mutableEnv.PYTHONPATH?.split(path.delimiter) ?? [];
128119
const pythonPathCommand = [fullPluginPath, ...pythonPathParts].join(path.delimiter);
@@ -139,10 +130,8 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
139130
resource: uri,
140131
interpreter,
141132
};
142-
console.log('EJFB before createActivatedEnvironment', executionFactory);
143133
// need to check what will happen in the exec service is NOT defined and is null
144134
const execService = await executionFactory?.createActivatedEnvironment(creationOptions);
145-
console.log('EJFB after exec service');
146135
try {
147136
// Remove positional test folders and files, we will add as needed per node
148137
let testArgs = removePositionalFoldersAndFiles(pytestArgs);
@@ -159,7 +148,6 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
159148

160149
// create a file with the test ids and set the environment variable to the file name
161150
const testIdsFileName = await utils.writeTestIdsFile(testIds);
162-
console.log('EJFB after write test ids file');
163151
mutableEnv.RUN_TEST_IDS_PIPE = testIdsFileName;
164152
traceInfo(`All environment variables set for pytest execution: ${JSON.stringify(mutableEnv)}`);
165153

@@ -186,7 +174,6 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
186174
serverCancel.cancel();
187175
});
188176
} else {
189-
console.log('EJFB before execObservable');
190177
// deferredTillExecClose is resolved when all stdout and stderr is read
191178
const deferredTillExecClose: Deferred<void> = utils.createTestingDeferred();
192179
// combine path to run script with run args
@@ -197,7 +184,6 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
197184
let resultProc: ChildProcess | undefined;
198185

199186
runInstance?.token.onCancellationRequested(() => {
200-
console.log('EJFB run instance canceled');
201187

202188
traceInfo(`Test run cancelled, killing pytest subprocess for workspace ${uri.fsPath}`);
203189
// if the resultProc exists just call kill on it which will handle resolving the ExecClose deferred, otherwise resolve the deferred here.
@@ -209,7 +195,6 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
209195
}
210196
});
211197

212-
console.log('EJFB before execObservable');
213198
const result = execService?.execObservable(runArgs, spawnOptions);
214199
resultProc = result?.proc;
215200

@@ -220,16 +205,13 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
220205
const out = utils.fixLogLinesNoTrailing(data.toString());
221206
runInstance?.appendOutput(out);
222207
this.outputChannel?.append(out);
223-
console.log('EJFB stdout', out);
224208
});
225209
result?.proc?.stderr?.on('data', (data) => {
226210
const out = utils.fixLogLinesNoTrailing(data.toString());
227211
runInstance?.appendOutput(out);
228212
this.outputChannel?.append(out);
229-
console.log('EJFB stderr', out);
230213
});
231214
result?.proc?.on('exit', (code, signal) => {
232-
console.log('EJFB on exit');
233215

234216
this.outputChannel?.append(utils.MESSAGE_ON_TESTING_OUTPUT_MOVE);
235217
if (code !== 0 && testIds) {
@@ -240,7 +222,6 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
240222
});
241223

242224
result?.proc?.on('close', (code, signal) => {
243-
console.log('EJFB on close');
244225

245226
traceVerbose('Test run finished, subprocess closed.');
246227
// if the child has testIds then this is a run request
@@ -266,8 +247,6 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
266247
deferredTillExecClose.resolve();
267248
serverCancel.cancel();
268249
});
269-
console.log('EJFB awaiting deferredTillExecClose');
270-
271250
await deferredTillExecClose.promise;
272251
}
273252
} catch (ex) {

src/test/testing/common/testingAdapter.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,6 @@ suite('End to End Tests: test adapters', () => {
11691169
failureMsg = err ? (err as Error).toString() : '';
11701170
failureOccurred = true;
11711171
}
1172-
console.log('EJFB returning promise.resolve');
11731172
return Promise.resolve();
11741173
};
11751174

@@ -1196,11 +1195,9 @@ suite('End to End Tests: test adapters', () => {
11961195
onCancellationRequested: () => undefined,
11971196
} as any),
11981197
);
1199-
console.log('EJFB, right before run tests');
12001198
await executionAdapter
12011199
.runTests(workspaceUri, testIds, TestRunProfileKind.Run, testRun.object, pythonExecFactory)
12021200
.finally(() => {
1203-
console.log('EJFB executing assertions');
12041201
assert.strictEqual(callCount, 1, 'Expected _resolveExecution to be called once');
12051202
assert.strictEqual(failureOccurred, false, failureMsg);
12061203
});

0 commit comments

Comments
 (0)