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 | 515f058d295df5f9a0c1bc068abd2c2a1f72dccb (patch) | |
| tree | 9b65369b0326a5f650d584fab69b8c4f04a7f28d | |
| parent | d4f1990c537d761989de342a3dd682e5df46c51c (diff) | |
| download | python-coveragepy-515f058d295df5f9a0c1bc068abd2c2a1f72dccb.tar.gz | |
Tweaks to Mickie's changes.
| -rw-r--r-- | AUTHORS.txt | 1 | ||||
| -rw-r--r-- | tests/test_parser.py | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/AUTHORS.txt b/AUTHORS.txt index fcd128e..b96990f 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -42,6 +42,7 @@ Marcus Cobden Mark van der Wal Martin Fuzzey Matthew Desmarais +Mickie Betz Noel O'Boyle Pablo Carballo Patrick Mezard diff --git a/tests/test_parser.py b/tests/test_parser.py index a39820e..04c345e 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): |
