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 | 529ef9857c37ab12ad10b35aa67e8fccb3d707d4 (patch) | |
| tree | f84820c51ae4af0ec051a324bccd0776fdb4516c /tests/test_arcs.py | |
| parent | d77a77ca6e8f7ccfaaf783e605ce1b60faef1dd9 (diff) | |
| download | python-coveragepy-529ef9857c37ab12ad10b35aa67e8fccb3d707d4.tar.gz | |
check_coverage now assumes empty missing and unpredicted, and uses branch always
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 a64ab89..1f1bdd1 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.""" |
