Skip to content

Commit b3e2166

Browse files
committed
refactor: Remove obsolete logic to prevent double wrapping in wrap_in_sync.
1 parent e9965b5 commit b3e2166

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

pytest_asyncio/plugin.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -689,12 +689,6 @@ def wrap_in_sync(
689689
Return a sync wrapper around an async function executing it in the
690690
current event loop.
691691
"""
692-
# if the function is already wrapped, we rewrap using the original one
693-
# not using __wrapped__ because the original function may already be
694-
# a wrapped one
695-
raw_func = getattr(func, "_raw_test_func", None)
696-
if raw_func is not None:
697-
func = raw_func
698692

699693
@functools.wraps(func)
700694
def inner(*args, **kwargs):
@@ -711,7 +705,6 @@ def inner(*args, **kwargs):
711705
task.exception()
712706
raise
713707

714-
inner._raw_test_func = func # type: ignore[attr-defined]
715708
return inner
716709

717710

0 commit comments

Comments
 (0)