Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Pytest] Add an inline error indicating the location in code where test discovery failed #19401

Copy link
Copy link
Closed as not planned
@MaddyGuthridge

Description

@MaddyGuthridge
Issue body actions

If there is a runtime error that occurs when discovering tests, it is quite a hassle to determine the point at which it failed.

The current method

Open the Output > Python log and scroll back until you find the spot where Pytest failed to discover your tests. Or alternatively, launch a terminal and run pytest yourself and search through its output to find the error.

My proposition

When Pytest discovery fails, the output is parsed to determine the location where it failed, so that an inline error can be created on that line of code. This makes it easier to spot issues that are causing Pytests to fail to run. Preferably, a quick link to that position would be provided for when you click on "Pytest discovery failed" in the testing panel, and the full details of the error would be provided within the inline error.

Adding this improvement would greatly simplify the process of finding errors when Pytest fails to run, especially for when those errors aren't picked up by the main language server (eg logical errors, or some issues with type hinting).

xiaoxi-david, MaddyGuthridge, shahananandy, stagefright5, Lakshmikanth2001 and 4 more

Metadata

Metadata

Assignees

Labels

area-testingcommunity askFeature request that the community expressed interest inFeature request that the community expressed interest infeature-requestRequest for new features or functionalityRequest for new features or functionalityinfo-neededIssue requires more information from posterIssue requires more information from posterneeds proposalNeed to make some design decisionsNeed to make some design decisions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.