summaryrefslogtreecommitdiff
path: root/tests/test_parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_parser.py')
-rw-r--r--tests/test_parser.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_parser.py b/tests/test_parser.py
index 04c345ec..81916a98 100644
--- a/tests/test_parser.py
+++ b/tests/test_parser.py
@@ -35,7 +35,6 @@ class PythonParserTest(CoverageTest):
})
def test_generator_exit_counts(self):
- # Generators' yield lines should only have one exit count.
# https://bitbucket.org/ned/coveragepy/issue/324/yield-in-loop-confuses-branch-coverage
parser = self.parse_source("""\
def gen(input):
@@ -45,7 +44,10 @@ class PythonParserTest(CoverageTest):
list(gen([1,2,3]))
""")
self.assertEqual(parser.exit_counts(), {
- 1:1, 2:2, 3:1, 5:1
+ 1:1, # def -> list
+ 2:2, # for -> yield; for -> exit
+ 3:2, # yield -> for; genexp exit
+ 5:1, # list -> exit
})
def test_try_except(self):