Skip to content

Commit 64478bf

Browse files
authored
Add functional tests for test adapter (#21803)
closes #21767
1 parent 84df45c commit 64478bf

File tree

6 files changed

+458
-7
lines changed

6 files changed

+458
-7
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ export class PytestTestDiscoveryAdapter implements ITestDiscoveryAdapter {
9898
deferredExec.resolve({ stdout: '', stderr: '' });
9999
deferred.resolve();
100100
});
101+
101102
await deferredExec.promise;
102103
}
103104
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
175175
this.outputChannel?.append(data);
176176
});
177177

178-
result?.proc?.on('close', () => {
178+
result?.proc?.on('exit', () => {
179179
deferredExec.resolve({ stdout: '', stderr: '' });
180180
deferred.resolve();
181181
disposeDataReceiver?.(this.testServer);

src/test/linters/lint.functional.test.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
'use strict';
55

66
import * as assert from 'assert';
7-
import * as childProcess from 'child_process';
87
import * as fs from 'fs-extra';
98
import * as os from 'os';
109
import * as path from 'path';
@@ -780,11 +779,6 @@ suite('Linting Functional Tests', () => {
780779
teardown(() => {
781780
sinon.restore();
782781
});
783-
784-
const pythonPath = childProcess.execSync(`"${PYTHON_PATH}" -c "import sys;print(sys.executable)"`);
785-
786-
console.log(`Testing linter with python ${pythonPath}`);
787-
788782
// These are integration tests that mock out everything except
789783
// the filesystem and process execution.
790784

0 commit comments

Comments
 (0)