Skip to content

Commit

Permalink
fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
eleanorjboyd committed Oct 1, 2024
1 parent c725079 commit a1383db
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 39 deletions.
10 changes: 0 additions & 10 deletions python_files/unittestadapter/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@
os.environ[path_var_name] = (
sysconfig.get_paths()["scripts"] + os.pathsep + os.environ[path_var_name]
)
sys.path.append("/Users/eleanorboyd/vscode-python/.nox/install_python_libs/lib/python3.10")
sys.path.append("/Users/eleanorboyd/vscode-python-debugger")
sys.path.append("/Users/eleanorboyd/vscode-python-debugger/bundled")
sys.path.append("/Users/eleanorboyd/vscode-python-debugger/bundled/libs")

import debugpy # noqa: E402

debugpy.connect(5678)
debugpy.breakpoint() # noqa: E702


script_dir = pathlib.Path(__file__).parent
sys.path.append(os.fspath(script_dir))
Expand Down
22 changes: 4 additions & 18 deletions src/client/testing/testController/common/resultResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,9 @@ import {
Range,
} from 'vscode';
import * as util from 'util';
import {
CoveragePayload,
DiscoveredTestPayload,

ExecutionTestPayload,
ITestResultResolver,
} from './types';
import { CoveragePayload, DiscoveredTestPayload, ExecutionTestPayload, ITestResultResolver } from './types';
import { TestProvider } from '../../types';
import { traceError } from '../../../logging';
import { traceError, traceVerbose } from '../../../logging';
import { Testing } from '../../../common/utils/localize';
import { clearAllChildren, createErrorTestItem, getTestCaseNodes } from './testItemUtilities';
import { sendTelemetryEvent } from '../../../telemetry';
Expand Down Expand Up @@ -110,16 +104,8 @@ export class PythonResultResolver implements ITestResultResolver {
});
}

public resolveExecution(
payload: ExecutionTestPayload | EOTTestPayload | CoveragePayload,
runInstance: TestRun,
deferredTillEOT: Deferred<void>,
): void {
if ('eot' in payload && payload.eot === true) {
// eot sent once per connection
traceVerbose('EOT received, resolving deferredTillServerClose');
deferredTillEOT.resolve();
} else if ('coverage' in payload) {
public resolveExecution(payload: ExecutionTestPayload | CoveragePayload, runInstance: TestRun): void {
if ('coverage' in payload) {
// coverage data is sent once per connection
traceVerbose('Coverage data received.');
this._resolveCoverage(payload as CoveragePayload, runInstance);
Expand Down
12 changes: 2 additions & 10 deletions src/client/testing/testController/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,16 +197,8 @@ export interface ITestResultResolver {
vsIdToRunId: Map<string, string>;
detailedCoverageMap: Map<string, FileCoverageDetail[]>;

resolveDiscovery(
payload: DiscoveredTestPayload | EOTTestPayload,
deferredTillEOT: Deferred<void>,
token?: CancellationToken,
): void;
resolveExecution(
payload: ExecutionTestPayload | EOTTestPayload | CoveragePayload,
runInstance: TestRun,
deferredTillEOT: Deferred<void>,
): void;
resolveDiscovery(payload: DiscoveredTestPayload, token?: CancellationToken): void;
resolveExecution(payload: ExecutionTestPayload | CoveragePayload, runInstance: TestRun): void;
_resolveDiscovery(payload: DiscoveredTestPayload, token?: CancellationToken): void;
_resolveExecution(payload: ExecutionTestPayload, runInstance: TestRun): void;
_resolveCoverage(payload: CoveragePayload, runInstance: TestRun): void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
TestCommandOptions,
TestDiscoveryCommand,
} from '../common/types';
import { Deferred, createDeferred } from '../../../common/utils/async';
import { createDeferred } from '../../../common/utils/async';
import { EnvironmentVariables, IEnvironmentVariablesProvider } from '../../../common/variables/types';
import {
ExecutionFactoryCreateWithEnvironmentOptions,
Expand Down

0 comments on commit a1383db

Please sign in to comment.