Description
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).