diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-01-08 07:18:37 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-01-08 07:18:37 -0500 |
commit | bc712fa95cbd7ca554a1d2fef8b26f15f897f09b (patch) | |
tree | 5c1b9d30b5f90eda3401334bd43ed68566ac1958 | |
parent | 19937575d10051965f906c5ca877b9b3e42a6931 (diff) | |
download | python-coveragepy-git-bc712fa95cbd7ca554a1d2fef8b26f15f897f09b.tar.gz |
Put the lambda tests together
-rw-r--r-- | coverage/parser.py | 1 | ||||
-rw-r--r-- | tests/test_arcs.py | 20 |
2 files changed, 11 insertions, 10 deletions
diff --git a/coverage/parser.py b/coverage/parser.py index 9f7400e5..babf4d73 100644 --- a/coverage/parser.py +++ b/coverage/parser.py @@ -260,6 +260,7 @@ class PythonParser(object): """ if self._all_arcs is None: + import pudb,sys as __sys;__sys.stdout=__sys.__stdout__;pudb.set_trace() # -={XX}=-={XX}=-={XX}=- aaa = AstArcAnalyzer(self.text, self.raw_funcdefs, self.raw_classdefs) arcs = aaa.collect_arcs() diff --git a/tests/test_arcs.py b/tests/test_arcs.py index c52bc8aa..1131555a 100644 --- a/tests/test_arcs.py +++ b/tests/test_arcs.py @@ -142,15 +142,6 @@ class SimpleArcTest(CoverageTest): arcz=".1 16 6. .2 23 3. 25 5.", arcz_missing="25 5." ) - def test_unused_lambdas_are_confusing_bug_90(self): - self.check_coverage("""\ - a = 1 - fn = lambda x: x - b = 3 - """, - arcz=".1 12 .2 2-2 23 3.", arcz_missing=".2 2-2", - ) - def test_what_is_the_sound_of_no_lines_clapping(self): self.check_coverage("""\ # __init__.py @@ -1034,7 +1025,7 @@ class DecoractorArcTest(CoverageTest): class LambdaArcTest(CoverageTest): """Tests of lambdas""" - def test_lambda(self): + def test_multiline_lambda(self): self.check_coverage("""\ fn = (lambda x: x + 2 @@ -1058,6 +1049,15 @@ class LambdaArcTest(CoverageTest): arcz=".2 2A A-4 2-4", ) + def test_unused_lambdas_are_confusing_bug_90(self): + self.check_coverage("""\ + a = 1 + fn = lambda x: x + b = 3 + """, + arcz=".1 12 .2 2-2 23 3.", arcz_missing=".2 2-2", + ) + class AsyncTest(CoverageTest): """Tests of the new async and await keywords in Python 3.5""" |