1. Ned Batchelder
  2. coverage.py
Issue #32 resolved

Empty class has branch == 2?

Ned Batchelder
repo owner created an issue

Gary Bernhardt reports (in a tweet!): "garybernhardt @nedbat A file with just "class Foo:\n pass" has Branch=2. Feels like a bug; is it one?"

Comments (3)

  1. Ned Batchelder reporter

    In the compiled code, line 1 can go next to two different places: line 2 or leave the file. That's why there are two branch possibilities in the code. But there's conceptually no branch here, so we should figure out a way to considering it as a branch.

  2. Log in to comment