-
Notifications
You must be signed in to change notification settings - Fork 88
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
Coverage gutters not showing for test scripts #389
Comments
Thanks for the ticket @wardy3! I vaguely remember other people having this issue, and it was due to how the extension matches coverage to source files. Can you provide a copy of the coverage section structure that is printed in the debug logs?
In addition to that, you could try using absolute paths instead of relative and that might fix your issue as well. (note, your coverage file will need to also provide absolute paths instead of relative as well) See an example here of a cov.xml |
The extension host output is blank. I tried going via cmd-shift-p -> Developer: show logs... -> Extension host and it brings me to the same place as far as coverage-gutters output though, there's this (with the source and test file I'm playing with now)
Yeah, this seems to have fixed it "coverage-gutters.coverageBaseDir": "/Users/wardy/Documents/EMC/gitlab.nosync/storage/cov.xml",
"coverage-gutters.manualCoverageFilePaths": [
"/Users/wardy/Documents/EMC/gitlab.nosync/storage/cov.xml"
] the <sources>
<source>/Users/wardy/Documents/EMC/gitlab.nosync/storage</source>
</sources> and <class name="test_isi_alloc.py" filename="tests/isi_sdk_tests/test_isi_alloc.py" complexity="0" line-rate="1" branch-rate="0"> main difference I can see in the log is this line:
Was it getting confused with the glob pattern before? (more log after it started working below)
thanks! |
Hmm odd that the shortcut for the developer logs didn't work... glad you found the logs another way though! Thanks again for the output as well and I am glad that the absolute work around helped you out in your scenario 💪🏻. |
Describe the bug
Coverage gutters seem to work fine on my actual script but not on the test script itself
The coverage file seems to be ok. These figures are correct. So I haven't written tests for the whole script but all the existing tests are being run.
However, the red/green colouring and the status bar value are not working for the test script.
It says "47% Coverage" for
isi_alloc.py
which matches the report. But for the test, I get "2% Coverage". The first few lines are marked green but then it seems to randomly highlight them, as if it's referring to a different file.To Reproduce
This is happening for all my test scripts but not for the actual scripts themselves. Even test scripts that are directly under
tests/
are affectedExpected behaviour
I would expect the gutters in the test to behave similar to the script.
Desktop (please complete the following information):
Version: 1.75.0-insider (Universal)
Commit: e2816fe719a4026ffa1ee0189dc89bdfdbafb164
Date: 2023-02-01T15:16:42.458Z
Electron: 19.1.9
Chromium: 102.0.5005.194
Node.js: 16.14.2
V8: 10.2.154.23-electron.0
OS: Darwin x64 22.3.0
Sandboxed: Yes
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: