File tree 2 files changed +19
-0
lines changed 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -611,6 +611,8 @@ def _line__Dict(self, node):
611
611
612
612
_line__FunctionDef = _line_decorated
613
613
614
+ _line__AsyncFunctionDef = _line_decorated
615
+
614
616
def _line__List (self , node ):
615
617
if node .elts :
616
618
return self .line_for_node (node .elts [0 ])
Original file line number Diff line number Diff line change @@ -1557,6 +1557,23 @@ async def go():
1557
1557
arcz_missing = ".2 23 3." ,
1558
1558
)
1559
1559
1560
+ def test_async_decorator (self ):
1561
+ if env .PYBEHAVIOR .trace_decorated_def :
1562
+ arcz = ".1 14 45 5. .2 2. -46 6-4"
1563
+ else :
1564
+ arcz = ".1 14 4. .2 2. -46 6-4"
1565
+ self .check_coverage ("""\
1566
+ def wrap(f): # 1
1567
+ return f
1568
+
1569
+ @wrap # 4
1570
+ async def go():
1571
+ return
1572
+ """ ,
1573
+ arcz = arcz ,
1574
+ arcz_missing = '-46 6-4' ,
1575
+ )
1576
+
1560
1577
1561
1578
class ExcludeTest (CoverageTest ):
1562
1579
"""Tests of exclusions to indicate known partial branches."""
You can’t perform that action at this time.
0 commit comments