diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-01-01 16:10:50 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-01-01 16:10:50 -0500 |
commit | f1e583f91035983237d248b417b8ca9831ceac39 (patch) | |
tree | 0bce77a485184176a494a2ab3345df6303769414 /tests/test_arcs.py | |
parent | c9464bbc696d393799c0989e4ca132987cc2fbb3 (diff) | |
download | python-coveragepy-git-f1e583f91035983237d248b417b8ca9831ceac39.tar.gz |
check_coverage now assumes empty missing and unpredicted, and uses branch always
--HG--
branch : ast-branch
Diffstat (limited to 'tests/test_arcs.py')
-rw-r--r-- | tests/test_arcs.py | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/tests/test_arcs.py b/tests/test_arcs.py index a64ab89e..1f1bdd1d 100644 --- a/tests/test_arcs.py +++ b/tests/test_arcs.py @@ -653,7 +653,7 @@ class ExceptionArcTest(CoverageTest): assert a == 7 and b == 1 and c == 9 """, arcz=".1 12 23 45 39 59 67 79 9A A.", arcz_missing="39 45 59", - arcz_unpredicted="34 46", + arcz_unpredicted="34 46", # TODO: 46 can be predicted. ) self.check_coverage("""\ a, b, c = 1, 1, 1 @@ -672,7 +672,7 @@ class ExceptionArcTest(CoverageTest): """, arcz=".1 12 23 34 4A 56 6A 78 8A AD BC CD D.", arcz_missing="4A 56 6A 78 8A AD", - arcz_unpredicted="45 57 7A AB", + arcz_unpredicted="45 57 7A AB", # TODO: 57 7A can be predicted. ) @@ -783,6 +783,24 @@ class YieldTest(CoverageTest): arcz_unpredicted="") self.assertEqual(self.stdout(), "20\n12\n") + def test_yield_from(self): + if env.PYVERSION < (3, 3): + self.skip("Python before 3.3 doesn't have 'yield from'") + self.check_coverage("""\ + def gen(inp): + i = 2 + for n in inp: + i = 4 + yield from range(3) + i = 6 + i = 7 + + list(gen([1,2,3])) + """, + arcz=".1 19 9. .2 23 34 45 56 5. 63 37 7.", + arcz_missing="", + arcz_unpredicted="") + class MiscArcTest(CoverageTest): """Miscellaneous arc-measuring tests.""" |