Skip to content

Commit

Permalink
Add functional tests for test adapter (#21803)
Browse files Browse the repository at this point in the history
closes #21767
  • Loading branch information
eleanorjboyd authored Aug 14, 2023
1 parent 84df45c commit 64478bf
Show file tree
Hide file tree
Showing 6 changed files with 458 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export class PytestTestDiscoveryAdapter implements ITestDiscoveryAdapter {
deferredExec.resolve({ stdout: '', stderr: '' });
deferred.resolve();
});

await deferredExec.promise;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
this.outputChannel?.append(data);
});

result?.proc?.on('close', () => {
result?.proc?.on('exit', () => {
deferredExec.resolve({ stdout: '', stderr: '' });
deferred.resolve();
disposeDataReceiver?.(this.testServer);
Expand Down
6 changes: 0 additions & 6 deletions src/test/linters/lint.functional.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
'use strict';

import * as assert from 'assert';
import * as childProcess from 'child_process';
import * as fs from 'fs-extra';
import * as os from 'os';
import * as path from 'path';
Expand Down Expand Up @@ -780,11 +779,6 @@ suite('Linting Functional Tests', () => {
teardown(() => {
sinon.restore();
});

const pythonPath = childProcess.execSync(`"${PYTHON_PATH}" -c "import sys;print(sys.executable)"`);

console.log(`Testing linter with python ${pythonPath}`);

// These are integration tests that mock out everything except
// the filesystem and process execution.

Expand Down
Loading

0 comments on commit 64478bf

Please sign in to comment.