diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_arcs.py | 16 | ||||
-rw-r--r-- | tests/test_data.py | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/tests/test_arcs.py b/tests/test_arcs.py index 030b719d..60cef938 100644 --- a/tests/test_arcs.py +++ b/tests/test_arcs.py @@ -981,6 +981,22 @@ class YieldTest(CoverageTest): arcz_unpredicted="5.", ) + def test_abandoned_yield(self): + # https://bitbucket.org/ned/coveragepy/issue/440 + self.check_coverage("""\ + def gen(): + print("yup") + yield "yielded" + print("nope") + + print(next(gen())) + """, + lines=[1, 2, 3, 4, 6], + missing="4", + arcz=".1 16 6. .2 23 34 4.", + arcz_missing="34 4.", + ) + class MiscArcTest(CoverageTest): """Miscellaneous arc-measuring tests.""" diff --git a/tests/test_data.py b/tests/test_data.py index b3882726..52702e97 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -66,7 +66,7 @@ ARCS_4 = { (1000, -1): None, }, } -SUMMARY_3_4 = {'x.py': 5, 'y.py': 2, 'z.py': 1} +SUMMARY_3_4 = {'x.py': 4, 'y.py': 2, 'z.py': 1} MEASURED_FILES_3_4 = ['x.py', 'y.py', 'z.py'] |