diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-01-18 19:24:50 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-01-18 19:24:50 -0500 |
commit | f9f70709ef14812aea64cb450c67f99bac6ef6ac (patch) | |
tree | b1fb3204e641f7d217530b80fe2bf3164a3df6b5 /tests/test_arcs.py | |
parent | 4b2ba8915687d5eabbb51d921bba169800bd93f3 (diff) | |
download | python-coveragepy-git-f9f70709ef14812aea64cb450c67f99bac6ef6ac.tar.gz |
Fix #466: multi-line statements first in decorated functions
Also, leave in the SetSpy tracer we've used before to find things like this.
Diffstat (limited to 'tests/test_arcs.py')
-rw-r--r-- | tests/test_arcs.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/test_arcs.py b/tests/test_arcs.py index 04dbd15a..5c0d1e50 100644 --- a/tests/test_arcs.py +++ b/tests/test_arcs.py @@ -1108,6 +1108,38 @@ class DecoratorArcTest(CoverageTest): ".6 D-6 ", # MyObject ) + def test_bug_466(self): + # A bad interaction between decorators and multi-line list assignments, + # believe it or not...! + self.check_coverage("""\ + class Parser(object): + + @classmethod + def parse(cls): + formats = [ 5 ] + + + return None + + Parser.parse() + """, + arcz=".1 1A A. 13 3. .5 58 8-3", + ) + self.check_coverage("""\ + class Parser(object): + + @classmethod + def parse(cls): + formats = [ + 6, + ] + return None + + Parser.parse() + """, + arcz=".1 1A A. 13 3. .5 58 8-3", + ) + class LambdaArcTest(CoverageTest): """Tests of lambdas""" |