Skip to content

Commit 101e5ff

Browse files
Use the specific types in TestMessageService.getFilteredTestMessages().
1 parent ffbf5bc commit 101e5ff

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/client/testing/pytest/services/testMessageService.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ import {
1919
Tests,
2020
TestStatus,
2121
} from '../../common/types';
22-
import { ILocationStackFrameDetails, IPythonTestMessage, PythonTestMessageSeverity } from '../../types';
22+
import {
23+
ILocationStackFrameDetails,
24+
IPythonTestMessage,
25+
ITestNonPassingMessage,
26+
ITestPassingMessage,
27+
PythonTestMessageSeverity,
28+
} from '../../types';
2329

2430
@injectable()
2531
export class TestMessageService implements ITestMessageService {
@@ -45,7 +51,7 @@ export class TestMessageService implements ITestMessageService {
4551
const status = tf.testFunction.status!;
4652
if (status === TestStatus.Pass) {
4753
// If the test passed, there's not much to do with it.
48-
const msg: IPythonTestMessage = {
54+
const msg: ITestPassingMessage = {
4955
code: nameToRun,
5056
severity: PythonTestMessageSeverity.Pass,
5157
provider: provider,
@@ -66,7 +72,7 @@ export class TestMessageService implements ITestMessageService {
6672
severity = PythonTestMessageSeverity.Skip;
6773
}
6874

69-
const msg: IPythonTestMessage = {
75+
const msg: ITestNonPassingMessage = {
7076
code: nameToRun,
7177
message: message,
7278
severity: severity,

0 commit comments

Comments
 (0)