-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Run Test with Coverage" should catch NoSource
exceptions
#24308
Comments
There may be better solutions still. E.g.,
Compare also #24309 |
How are you listing omitted files? Omitting seems to be something I need to explore in general as I have gotten a few comments related to this. How does your issue compare to #24366? It seems your ask is less about the UI including or not including and more about if the run works due to files you need to skip? |
At its core, this issue is not about omitting files. Being able to omit files (either during run [which is currently possible via the coverage configuration] or report [which is not currently possible], compare #24309 (comment)) would be one workaround for this issue, but it's a different problem altogether. In this issue, I care about error handling during the reporting phase, in case a file that existed during This can happen for other reasons, too - e.g., when processing coverage results after uninstalling a Python library. So I would argue that the extension should catch |
Yes, correct. |
Thank you for the clarification! I will look into this now I understand the whole premise |
The root cause of my observations in #24307 (which still deserves its own solution IMHO) is nedbat/coveragepy#1392. Unfortunately, configuring
omit
alone does not help because this code snipped does not consider it:vscode-python/python_files/vscode_pytest/__init__.py
Lines 432 to 448 in e8dd8c0
cov._check_include_omit_etc
being private, the extension cannot really know what to check. So I propose replacingvscode-python/python_files/vscode_pytest/__init__.py
Line 440 in e8dd8c0
by
The text was updated successfully, but these errors were encountered: