diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2015-04-18 09:29:43 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2015-04-18 09:29:43 -0400 |
commit | 13db3dfa8471333b4410e217fab3e80502075846 (patch) | |
tree | 57ad0aa4f7f9e91346a81721513b3362d5485877 /tests/test_parser.py | |
parent | 90189c05e6e8716b6cc6f78cf3e1e98f9fa045c1 (diff) | |
download | python-coveragepy-git-13db3dfa8471333b4410e217fab3e80502075846.tar.gz |
Tweaks to Mickie's changes.
Diffstat (limited to 'tests/test_parser.py')
-rw-r--r-- | tests/test_parser.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_parser.py b/tests/test_parser.py index a39820e6..04c345ec 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -35,8 +35,9 @@ 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("""\ - # generators yield lines should only have one exit count def gen(input): for n in inp: yield (i * 2 for i in range(n)) @@ -44,7 +45,7 @@ class PythonParserTest(CoverageTest): list(gen([1,2,3])) """) self.assertEqual(parser.exit_counts(), { - 2:1, 3:2, 4:1, 6:1 + 1:1, 2:2, 3:1, 5:1 }) def test_try_except(self): |