summaryrefslogtreecommitdiff
path: root/tests/test_arcs.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_arcs.py')
-rw-r--r--tests/test_arcs.py16
1 files changed, 16 insertions, 0 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."""