jborean93 / smbprotocol

Python SMBv2 and v3 Client
MIT License
320 stars 74 forks source link

or path.startswith('//') #103

Closed dHannasch closed 3 years ago

codecov[bot] commented 3 years ago

Codecov Report

Merging #103 (3528b41) into master (af569b5) will decrease coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #103      +/-   ##
==========================================
- Coverage   98.84%   98.83%   -0.02%     
==========================================
  Files          23       23              
  Lines        4950     4979      +29     
==========================================
+ Hits         4893     4921      +28     
- Misses         57       58       +1     
Impacted Files Coverage Δ
smbclient/_os.py 98.48% <100.00%> (+0.03%) :arrow_up:
smbprotocol/transport.py 97.82% <0.00%> (-1.09%) :arrow_down:
smbprotocol/exceptions.py 100.00% <0.00%> (ø)
smbclient/_io.py 99.02% <0.00%> (+0.06%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update af569b5...3528b41. Read the comment docs.

dHannasch commented 3 years ago

codecov says that https://app.codecov.io/gh/jborean93/smbprotocol/compare/103/changes#D1L574 is somehow no longer covered although the lines after it, such as query_flags = 0 # Only the first request should have set SMB2_RESTART_SCANS, are still covered. I...don't know how that's even possible.

jborean93 commented 3 years ago

Looking at the output it seems like the lines have been shifted from the hit count to the left on them so the report is not showing the correct lines

image

There might be a bug on the codecov side trying to merge the diff (or lack of in this case) with the data it was given. I'll have to keep an eye on it. If you check the run for Azure Pipelines you can see that this file is unchanged and those lines are in fact covered https://dev.azure.com/jborean93/fa253176-5e40-44b7-b0e1-76408675a0b9/_apis/test/CodeCoverage/browse/13441289/Code%20Coverage%20Report_948/._py.3.html.

In reality the error here is the smbprotocol/transport.py has reduced coverage but the code in there is very variable to race conditions hence why it sometimes fires and other times it does not. I'll probably just need to add some #pragma: nocover on those affected lines to avoid this happening in the future.