coverlet-coverage / coverlet

Cross platform code coverage for .NET
MIT License
2.96k stars 386 forks source link

Branch coverage issue with AsyncEnumerable Extension (yield return) #1335

Open manuelamateo opened 2 years ago

manuelamateo commented 2 years ago

When testing an AsyncEnumerable extension that transforms an AsyncEnumerable in an nested form of well sized batches, I get a high percentage of uncovered branches. There aren't any obvious branches to cover and I can't figure out how to fix it. It may be a bug.

See reproduction https://github.com/meggima/coverlet-reproductions AsyncEnumerableBatchExtensionReproduction.cs & AsyncEnumerableBatchExtensionReproductionFixture.cs (Version coverlet.msbuild 3.1.2)

Thanks for looking into it.

image

MarcoRossignoli commented 2 years ago

Thanks for reporting this