Created
February 15, 2013 16:36
-
-
Save mhrivnak/4961569 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def bar1(): | |
for x in range(4): | |
if x == 0: | |
pass | |
else: | |
# coverage thinks this line isn't covered | |
continue | |
def bar2(): | |
for x in range(4): | |
if x == 0: | |
pass | |
else: | |
# any statement here in addition to the "continue" seems to cause | |
# coverage to be satisfied for the entire "else" block | |
True | |
continue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
import foo | |
class TestBar(unittest.TestCase): | |
def test_bar(self): | |
foo.bar1() | |
foo.bar2() |
Author
mhrivnak
commented
Feb 15, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment