forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestexecutionLogger.ts
More file actions
26 lines (25 loc) · 1.05 KB
/
testexecutionLogger.ts
File metadata and controls
26 lines (25 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { injectable } from 'inversify';
import { noop } from '../../client/common/utils/misc';
import { traceCellResults } from '../../client/datascience/common';
import { ICell, INotebookExecutionLogger } from '../../client/datascience/types';
import { traceInfo } from '../../client/logging';
import { concatMultilineStringInput } from '../../datascience-ui/common';
@injectable()
export class TestExecutionLogger implements INotebookExecutionLogger {
public dispose() {
noop();
}
public preExecute(cell: ICell, _silent: boolean): Promise<void> {
traceInfo(`Cell Execution for ${cell.id} : \n${concatMultilineStringInput(cell.data.source)}\n`);
return Promise.resolve();
}
public postExecute(cell: ICell, _silent: boolean): Promise<void> {
traceCellResults(`Cell Execution complete for ${cell.id}\n`, [cell]);
return Promise.resolve();
}
public onKernelRestarted(): void {
// Can ignore this.
}
}