Incomplete Branch Coverage in Try/Except Block

Issue #384 duplicate
Lasse Schuirmann created an issue


we're getting an incomplete branch coverage for this situation:

So obviously coverage wants us to test the exception. However, we're doing that with an ugly whitebox test overwriting the open builtin. I don't really see how we miss a jump here and others in the team are also out of clues, can you provide any insight? This looks like a bug to me.

(Note: this issue is not specific to codecov and also occurs locally.)

Here's the code of this very state:

You can execute tests locally to reproduce with ./ -c.

We're happy to provide any additional information needed.

Comments (4)

  1. Lasse Schuirmann reporter

    or to make it simpler: here's instructions to reproduce

    git clone
    cd coala
    git checkout 6c9d09081ee841a15363edef17f8b8ff252dc674
    ./ -H  # -c generates coverage, -H generates HTML and opens in browser
  2. Log in to comment