Skip to content

Fix handling of test results with undefined status.#15348

Closed
ericsnowcurrently wants to merge 4 commits intomicrosoft:mainfrom
ericsnowcurrently:testing-results-undefined-status
Closed

Fix handling of test results with undefined status.#15348
ericsnowcurrently wants to merge 4 commits intomicrosoft:mainfrom
ericsnowcurrently:testing-results-undefined-status

Conversation

@ericsnowcurrently
Copy link
Copy Markdown

@ericsnowcurrently ericsnowcurrently commented Feb 9, 2021

(fixes #14866)

The 2 key changes are:

  • in TestMessageService.getFilteredTestMessages(), skip test results with an undefined status
  • use separate message types for passing vs. non-passing tests

Note: I will be updating for eslint once reviews are done.

@ericsnowcurrently ericsnowcurrently force-pushed the testing-results-undefined-status branch from 8f8da4d to 8015cf5 Compare February 9, 2021 19:08
@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #15348 (8015cf5) into main (f56e030) will decrease coverage by 0%.
The diff coverage is 11%.

@@          Coverage Diff           @@
##            main   #15348   +/-   ##
======================================
- Coverage     65%      65%   -1%     
======================================
  Files        559      559           
  Lines      26799    26804    +5     
  Branches    3868     3869    +1     
======================================
  Hits       17447    17447           
- Misses      8634     8639    +5     
  Partials     718      718           
Impacted Files Coverage Δ
src/client/testing/types.ts 90% <ø> (ø)
.../client/testing/common/managers/baseTestManager.ts 44% <9%> (-1%) ⬇️
...ient/testing/pytest/services/testMessageService.ts 7% <16%> (-1%) ⬇️

private getDiagnosticMessage(message: IPythonTestFailMessage): string {
const diagPrefix = this.unitTestDiagnosticService.getMessagePrefix(message.status)!;
const diagMsg = message.message ? message.message.split('\n')[0] : '';
return `${diagPrefix}: ${diagMsg}`;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this change have no impact on the issue that caused us to introduce the "Ok" string in the diagnostic message? #14067

}
export interface IPythonTestFailMessage extends IPythonTestMessageCommon {
status: Exclude<TestStatus, TestStatus.Pass>;
severity: PythonTestMessageSeverity.Error | PythonTestMessageSeverity.Skip;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why aren't we handling PythonTestMessageSeverity.Failure?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I'll fix that (properly).

@ericsnowcurrently
Copy link
Copy Markdown
Author

ericsnowcurrently commented Feb 11, 2021

There's a bunch of cleanup involved to do this right, which obscures the key change here. I'm going to put up 2 PRs to keep things separate. (#15387 and ???)

@ericsnowcurrently ericsnowcurrently deleted the testing-results-undefined-status branch February 11, 2021 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog No news entry required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When debugging pytest tests, extension displays "Ok" in the problems window

3 participants