chia-blockchain
chia-blockchain copied to clipboard
Fix coverage report
This pull request introduces 11 alerts and fixes 10 when merging dfd10d3c47dd5a30a9d08afed5220e513e8a39b5 into e259dd8dfda7907e182a7e9fde29cad69e0ca1f5 - view on LGTM.com
new alerts:
- 8 for Unused variable, import, function or class
- 1 for Module is imported more than once
- 1 for Unused local variable
- 1 for Module-level cyclic import
fixed alerts:
- 9 for Unused variable, import, function or class
- 1 for Missing call to `__init__` during object initialization
This pull request introduces 11 alerts and fixes 10 when merging 75b3bdebc3f1cabd57eea030b84d7251f2ff41e3 into e259dd8dfda7907e182a7e9fde29cad69e0ca1f5 - view on LGTM.com
new alerts:
- 8 for Unused variable, import, function or class
- 1 for Module is imported more than once
- 1 for Unused local variable
- 1 for Module-level cyclic import
fixed alerts:
- 9 for Unused variable, import, function or class
- 1 for Missing call to `__init__` during object initialization
This pull request introduces 1 alert when merging bcab8e6a5def4ad8c6c1045eaadced5034c6b58f into aa0e996ac5e744f53c36e0bd823d62dad520cf70 - view on LGTM.com
new alerts:
- 1 for Unused import
Closing and reopening to trigger a new merge with main
in hopes of some NFT test fixes helping this run to completion.
I think this is not processing the Windows coverage information. For example, it seems that we are capturing coverage of importing
chia/daemon/windows_signal.py
but we lack coverage for the portion run only on Windows (lines 19-54).I found what appears to be an import sequence that would load this file for any test run regardless of platform, but to make this a bit more explicit, it might be worth adding a canary test file for coverage where the sole purpose of the file is simply to have sections that are each only executed on one platform.
test_coverage_canary.py
or such, perhaps. That would provide an easy reference to remember in any coverage results.https://github.com/Chia-Network/chia-blockchain/runs/7779353683?check_suite_focus=true#step:7:1308
chia/daemon/windows_signal.py 28 20 8 1 25.0% 19-54
https://github.com/Chia-Network/chia-blockchain/blob/0bc69603c073ec2037f4896a23f750bca6c2d29c/chia/daemon/windows_signal.py#L15-L54
i dont follow, your saying the 25% is wrong ?
Yes, I would expect the Windows-only portions of the file to be covered when imported for the Windows tests. Though, I did not do a detailed verification that the file is really imported in the Windows tests. Just a cursory check such that I expect the file is imported.
This pull request has conflicts, please resolve those before we can evaluate the pull request.