for…else always reports missing branch · Issue #122 · nedbat/coveragepy (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
Originally reported by Brandon Rhodes (Bitbucket: brandon, GitHub: brandon)
The attached program, which sends its "for" statement through every possible branch, nevertheless elicits a complaint from "coverage" that the "for" loop missed one of its possibilities. Apparently, "coverage" does not realize that a "for" loop with an "else" statement cannot result in immediately jumping to the end of the whole statement, skipping the "else".
- Bitbucket: https://bitbucket.org/ned/coveragepy/issue/122
- This issue had attachments: forelse.py. See the original issue for details.