diff options
author | Kjell Braden <afflux@pentabarf.de> | 2020-03-24 19:31:57 +0100 |
---|---|---|
committer | Kjell Braden <afflux@pentabarf.de> | 2020-03-24 20:13:08 +0100 |
commit | 0db15a2bd71e6893fadc91d262fa3fb2ead47ade (patch) | |
tree | 4ebdb83f1c70b6118480fe496854737bd3870b07 /tests/test_arcs.py | |
parent | f318f932fadeda885077db678b06112a49bbea91 (diff) | |
download | python-coveragepy-git-0db15a2bd71e6893fadc91d262fa3fb2ead47ade.tar.gz |
handle decorators for AsyncFunctionDefs. Closes #964
Diffstat (limited to 'tests/test_arcs.py')
-rw-r--r-- | tests/test_arcs.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_arcs.py b/tests/test_arcs.py index bf17f712..a02e9f7d 100644 --- a/tests/test_arcs.py +++ b/tests/test_arcs.py @@ -1557,6 +1557,23 @@ class AsyncTest(CoverageTest): arcz_missing=".2 23 3.", ) + def test_async_decorator(self): + if env.PYBEHAVIOR.trace_decorated_def: + arcz = ".1 14 45 5. .2 2. -46 6-4" + else: + arcz = ".1 14 4. .2 2. -46 6-4" + self.check_coverage("""\ + def wrap(f): # 1 + return f + + @wrap # 4 + async def go(): + return + """, + arcz=arcz, + arcz_missing='-46 6-4', + ) + class ExcludeTest(CoverageTest): """Tests of exclusions to indicate known partial branches.""" |