diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2011-07-04 10:27:39 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2011-07-04 10:27:39 -0400 |
commit | 0b05ae076815f9239019e04778d4d481c8ae1ac3 (patch) | |
tree | a183898beb2eae2a039b8a8bc8fcf6aa3e629438 /test/test_arcs.py | |
parent | 60cca15e47acf3374e2d8789350c90204a334864 (diff) | |
download | python-coveragepy-0b05ae076815f9239019e04778d4d481c8ae1ac3.tar.gz |
A test and a fix for issue #122, maybe?
Diffstat (limited to 'test/test_arcs.py')
-rw-r--r-- | test/test_arcs.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test_arcs.py b/test/test_arcs.py index 0c16929..9f86ecd 100644 --- a/test/test_arcs.py +++ b/test/test_arcs.py @@ -260,6 +260,21 @@ class LoopArcTest(CoverageTest): arcz_missing="26 6." ) + def test_for_else(self): + self.check_coverage("""\ + def forelse(seq): + for n in seq: + if n > 5: + break + else: + print('None of the values were greater than 5') + print('Done') + forelse([1,2]) + forelse([1,6]) + """, + arcz=".1 .2 23 32 34 47 26 67 7. 18 89 9." + ) + class ExceptionArcTest(CoverageTest): """Arc-measuring tests involving exception handling.""" |