missing unconditional line ... ?!?

Issue #247 invalid
Christian Theune created an issue

The following report shows that the line 33 is executed and thus line 34 must have been executed too. I'm not sure why coverage thinks it has not been executed ...


This is using py.test + coverage plugin + coverage on Python 2.7 on OS X.

Comments (3)

  1. Ned Batchelder repo owner

    Line 34 might not have been executed, if line 33 raises an exception. In fact, line 33 has an error in it, and I think will raise "TypeError: 'file' object is not callable".

    Line 33 should be:

    print >>sys.stderr, 'Could not acquire lock {}'.format(filename)

    Are you sure you are seeing all errors raised by your tests?

  2. Log in to comment