Skip to content

Commit 9284391

Browse files
committed
[fix] Fixes a bug in PytestAsyncioFunction._from_function that prevented own_markers from being transferred to the subclass instance.
Signed-off-by: Michael Seifert <[email protected]>
1 parent 90d548a commit 9284391

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pytest_asyncio/plugin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ def _from_function(cls, function: Function, /) -> Function:
395395
keywords=function.keywords,
396396
originalname=function.originalname,
397397
)
398+
subclass_instance.own_markers.extend(function.own_markers)
398399
subclassed_function_signature = inspect.signature(subclass_instance.obj)
399400
if "event_loop" in subclassed_function_signature.parameters:
400401
subclass_instance.warn(

0 commit comments

Comments
 (0)