Skip to content

Commit 9533e9d

Browse files
committed
v2.1
1 parent 04a6ad4 commit 9533e9d

File tree

8 files changed

+191
-1192
lines changed

8 files changed

+191
-1192
lines changed
Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
2-
// Licensed under the MIT License.
1+
// // Copyright (c) Microsoft Corporation. All rights reserved.
2+
// // Licensed under the MIT License.
33

4-
import { inject, injectable } from 'inversify';
5-
import {
6-
ExecutionFactoryCreateWithEnvironmentOptions,
7-
IPythonExecutionFactory,
8-
SpawnOptions,
9-
} from '../../../common/process/types';
10-
import { TestDiscoveryOptions } from '../../common/types';
11-
import { ITestDiscoveryHelper, RawDiscoveredTests } from './types';
4+
// import { inject, injectable } from 'inversify';
5+
// import {
6+
// ExecutionFactoryCreateWithEnvironmentOptions,
7+
// IPythonExecutionFactory,
8+
// SpawnOptions,
9+
// } from '../../../common/process/types';
10+
// import { TestDiscoveryOptions } from '../../common/types';
11+
// import { ITestDiscoveryHelper, RawDiscoveredTests } from './types';
1212

13-
@injectable()
14-
export class TestDiscoveryHelper implements ITestDiscoveryHelper {
15-
constructor(@inject(IPythonExecutionFactory) private readonly pythonExecFactory: IPythonExecutionFactory) {}
13+
// @injectable()
14+
// export class TestDiscoveryHelper implements ITestDiscoveryHelper {
15+
// constructor(@inject(IPythonExecutionFactory) private readonly pythonExecFactory: IPythonExecutionFactory) {}
1616

17-
public async runTestDiscovery(options: TestDiscoveryOptions): Promise<RawDiscoveredTests[]> {
18-
const creationOptions: ExecutionFactoryCreateWithEnvironmentOptions = {
19-
allowEnvironmentFetchExceptions: false,
20-
resource: options.workspaceFolder,
21-
};
22-
const execService = await this.pythonExecFactory.createActivatedEnvironment(creationOptions);
17+
// public async runTestDiscovery(options: TestDiscoveryOptions): Promise<RawDiscoveredTests[]> {
18+
// const creationOptions: ExecutionFactoryCreateWithEnvironmentOptions = {
19+
// allowEnvironmentFetchExceptions: false,
20+
// resource: options.workspaceFolder,
21+
// };
22+
// const execService = await this.pythonExecFactory.createActivatedEnvironment(creationOptions);
2323

24-
const spawnOptions: SpawnOptions = {
25-
token: options.token,
26-
cwd: options.cwd,
27-
throwOnStdErr: true,
28-
};
24+
// const spawnOptions: SpawnOptions = {
25+
// token: options.token,
26+
// cwd: options.cwd,
27+
// throwOnStdErr: true,
28+
// };
2929

30-
if (options.outChannel) {
31-
options.outChannel.appendLine(`python ${options.args.join(' ')}`);
32-
}
30+
// if (options.outChannel) {
31+
// options.outChannel.appendLine(`python ${options.args.join(' ')}`);
32+
// }
3333

34-
const proc = await execService.exec(options.args, spawnOptions);
35-
try {
36-
return JSON.parse(proc.stdout);
37-
} catch (ex) {
38-
const error = ex as SyntaxError;
39-
error.message = proc.stdout;
40-
throw ex; // re-throw
41-
}
42-
}
43-
}
34+
// const proc = await execService.exec(options.args, spawnOptions);
35+
// try {
36+
// return JSON.parse(proc.stdout);
37+
// } catch (ex) {
38+
// const error = ex as SyntaxError;
39+
// error.message = proc.stdout;
40+
// throw ex; // re-throw
41+
// }
42+
// }
43+
// }

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

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
Uri,
1414
WorkspaceFolder,
1515
} from 'vscode';
16-
import { ITestDebugLauncher, TestDiscoveryOptions } from '../../common/types';
16+
import { ITestDebugLauncher } from '../../common/types';
1717
import { IPythonExecutionFactory } from '../../../common/process/types';
1818
import { EnvironmentVariables } from '../../../common/variables/types';
1919
import { PythonEnvironment } from '../../../pythonEnvironments/info';
@@ -39,11 +39,6 @@ export interface TestData {
3939
kind: TestDataKinds;
4040
}
4141

42-
export const ITestDiscoveryHelper = Symbol('ITestDiscoveryHelper');
43-
export interface ITestDiscoveryHelper {
44-
runTestDiscovery(options: TestDiscoveryOptions): Promise<RawDiscoveredTests[]>;
45-
}
46-
4742
export type TestRefreshOptions = { forceRefresh: boolean };
4843

4944
export const ITestController = Symbol('ITestController');
@@ -65,24 +60,10 @@ export interface ITestRun {
6560
export const ITestFrameworkController = Symbol('ITestFrameworkController');
6661
export interface ITestFrameworkController {
6762
resolveChildren(testController: TestController, item: TestItem, token?: CancellationToken): Promise<void>;
68-
refreshTestData(testController: TestController, resource?: Uri, token?: CancellationToken): Promise<void>;
69-
runTests(
70-
testRun: ITestRun,
71-
workspace: WorkspaceFolder,
72-
token: CancellationToken,
73-
testController?: TestController,
74-
): Promise<void>;
7563
}
7664

7765
export const ITestsRunner = Symbol('ITestsRunner');
78-
export interface ITestsRunner {
79-
runTests(
80-
testRun: ITestRun,
81-
options: TestRunOptions,
82-
idToRawData: Map<string, TestData>,
83-
testController?: TestController,
84-
): Promise<void>;
85-
}
66+
export interface ITestsRunner {}
8667

8768
export type TestRunOptions = {
8869
workspaceFolder: Uri;

0 commit comments

Comments
 (0)